-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
144 additions
and
14 deletions.
There are no files selected for viewing
13 changes: 10 additions & 3 deletions
13
packages/adena-extension/src/components/atoms/highlight-number/highlight-number.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
.../adena-extension/src/components/pages/main/main-network-label/main-network-label.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react'; | ||
import { RecoilRoot } from 'recoil'; | ||
import { ThemeProvider } from 'styled-components'; | ||
import { render } from '@testing-library/react'; | ||
import theme from '@styles/theme'; | ||
import MainNetworkLabel, { MainNetworkLabelProps } from './main-network-label'; | ||
import { GlobalPopupStyle } from '@styles/global-style'; | ||
|
||
describe('MainNetworkLabel Component', () => { | ||
it('MainNetworkLabel render', () => { | ||
const args: MainNetworkLabelProps = { | ||
networkName: 'Network', | ||
}; | ||
|
||
render( | ||
<RecoilRoot> | ||
<GlobalPopupStyle /> | ||
<ThemeProvider theme={theme}> | ||
<MainNetworkLabel {...args} /> | ||
</ThemeProvider> | ||
</RecoilRoot>, | ||
); | ||
}); | ||
}); |
13 changes: 13 additions & 0 deletions
13
...ena-extension/src/components/pages/main/main-network-label/main-network-label.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import MainNetworkLabel, { type MainNetworkLabelProps } from './main-network-label'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
export default { | ||
title: 'components/main/MainNetworkLabel', | ||
component: MainNetworkLabel, | ||
} as Meta<typeof MainNetworkLabel>; | ||
|
||
export const Default: StoryObj<MainNetworkLabelProps> = { | ||
args: { | ||
networkName: 'Test3', | ||
}, | ||
}; |
12 changes: 12 additions & 0 deletions
12
...adena-extension/src/components/pages/main/main-network-label/main-network-label.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import styled from 'styled-components'; | ||
|
||
import { View } from '@components/atoms'; | ||
|
||
export const MainNetworkLabelWrapper = styled(View)` | ||
width: 100%; | ||
height: auto; | ||
background-color: ${({ theme }): string => theme.primary._1}; | ||
align-items: center; | ||
justify-content: center; | ||
height: 30px; | ||
`; |
26 changes: 26 additions & 0 deletions
26
packages/adena-extension/src/components/pages/main/main-network-label/main-network-label.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from 'react'; | ||
import { useTheme } from 'styled-components'; | ||
import { Text } from '@components/atoms'; | ||
import { MainNetworkLabelWrapper } from './main-network-label.styles'; | ||
|
||
export interface MainNetworkLabelProps { | ||
networkName: string; | ||
} | ||
|
||
const MainNetworkLabel: React.FC<MainNetworkLabelProps> = ({ networkName }) => { | ||
const theme = useTheme(); | ||
|
||
return ( | ||
<MainNetworkLabelWrapper> | ||
<Text | ||
style={{ display: 'flex', flexDirection: 'row' }} | ||
type='light13' | ||
color={theme.primary._2} | ||
> | ||
You are on <Text type='bold13'>{networkName}</Text> | ||
</Text> | ||
</MainNetworkLabelWrapper> | ||
); | ||
}; | ||
|
||
export default MainNetworkLabel; |
9 changes: 9 additions & 0 deletions
9
...adena-extension/src/components/pages/main/main-token-balance/main-token-balance.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { View } from '@components/atoms'; | ||
import styled from 'styled-components'; | ||
|
||
export const MainTokenBalanceWrapper = styled(View)` | ||
width: 100%; | ||
height: auto; | ||
align-items: center; | ||
justify-content: center; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters