-
Notifications
You must be signed in to change notification settings - Fork 15
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
1 parent
ca8e95f
commit 833e888
Showing
66 changed files
with
3,342 additions
and
751 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 107 additions & 0 deletions
107
packages/ens-app-v3/src/components/@molecules/PohStatus/PohStatus.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,107 @@ | ||
import styled, { css } from 'styled-components' | ||
|
||
import CheckCircle from '@app/assets/CheckCircle.svg' | ||
import MinusCircle from '@app/assets/MinusCircle.svg' | ||
|
||
const Container = styled.div( | ||
({ theme }) => css` | ||
width: 100%; | ||
padding: ${theme.space['1']}; | ||
border: 1px solid ${theme.colors.border}; | ||
border-radius: ${theme.radii.full}; | ||
display: flex; | ||
justify-content: center; | ||
gap: ${theme.space['4']}; | ||
`, | ||
) | ||
|
||
const LabelContainer = styled.div( | ||
({ theme }) => css` | ||
display: flex; | ||
height: ${theme.space['11']}; | ||
border-radius: ${theme.radii.full}; | ||
background-color: transparent; | ||
overflow: hidden; | ||
`, | ||
) | ||
|
||
const StatusLabel = styled.label( | ||
({ theme }) => css` | ||
height: ${theme.space['11']}; | ||
display: block; | ||
white-space: nowrap; | ||
text-overflow: ellipsis; | ||
overflow: hidden; | ||
font-style: normal; | ||
font-weight: ${theme.fontWeights.bold}; | ||
font-size: ${theme.fontSizes.headingTwo}; | ||
line-height: ${theme.space['11']}; | ||
text-align: center; | ||
color: ${theme.colors.bluePrimary}; | ||
`, | ||
) | ||
|
||
const NotValidImg = styled.div( | ||
({ theme }) => css` | ||
height: ${theme.space['11']}; | ||
width: ${theme.space['11']}; | ||
border-radius: 50%; | ||
background: ${theme.colors.background}; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
svg { | ||
display: block; | ||
transform: scale(1); | ||
pointer-events: none; | ||
path { | ||
fill: ${theme.colors.red}; | ||
} | ||
} | ||
`, | ||
) | ||
|
||
const ValidImg = styled.div( | ||
({ theme }) => css` | ||
height: ${theme.space['11']}; | ||
width: ${theme.space['11']}; | ||
border-radius: 50%; | ||
background: ${theme.colors.greenBright}; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
svg { | ||
display: block; | ||
transform: scale(1); | ||
pointer-events: none; | ||
path { | ||
fill: ${theme.colors.greenBright}; | ||
} | ||
} | ||
`, | ||
) | ||
|
||
type Props = { | ||
valid: boolean | ||
} | ||
|
||
export const PohStatus = ({ valid }: Props) => { | ||
return ( | ||
<Container data-testid="poh-status"> | ||
<LabelContainer> | ||
<StatusLabel>Linea PoH status:</StatusLabel> | ||
</LabelContainer> | ||
{valid && ( | ||
<ValidImg> | ||
<CheckCircle /> | ||
</ValidImg> | ||
)} | ||
|
||
{!valid && ( | ||
<NotValidImg> | ||
<MinusCircle /> | ||
</NotValidImg> | ||
)} | ||
</Container> | ||
) | ||
} |
Oops, something went wrong.