-
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.
refactor. Update Sensitive Info Component (#347)
- Loading branch information
Showing
15 changed files
with
142 additions
and
346 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions
69
packages/adena-extension/src/components/pages/web/sensitive-info-step/index.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,69 @@ | ||
import { ReactElement } from 'react'; | ||
import styled, { useTheme } from 'styled-components'; | ||
|
||
import IconAlert from '@assets/web/alert-rounded.svg'; | ||
import IconLink from '@assets/web/external-link.svg'; | ||
|
||
import { Pressable, Row, View, WebButton, WebImg, WebText } from '@components/atoms'; | ||
import useLink from '@hooks/use-link'; | ||
|
||
const StyledContainer = styled(View)` | ||
width: 540px; | ||
row-gap: 40px; | ||
align-items: flex-start; | ||
`; | ||
|
||
const StyledMessageBox = styled(View)` | ||
row-gap: 16px; | ||
`; | ||
|
||
export type SensitiveInfoStepProps = { | ||
link?: string; | ||
desc: string; | ||
onClickNext: () => void; | ||
}; | ||
|
||
export const SensitiveInfoStep = ({ | ||
link, | ||
desc, | ||
onClickNext, | ||
}: SensitiveInfoStepProps): ReactElement => { | ||
const theme = useTheme(); | ||
const { openLink } = useLink(); | ||
|
||
return ( | ||
<StyledContainer> | ||
<View style={{ rowGap: 24, alignItems: 'flex-start' }}> | ||
<WebImg src={IconAlert} /> | ||
<StyledMessageBox> | ||
<WebText type='headline3'>Sensitive Information Ahead</WebText> | ||
<WebText type='body4' color={theme.webNeutral._500}> | ||
{desc} | ||
</WebText> | ||
</StyledMessageBox> | ||
</View> | ||
<WebButton | ||
figure='primary' | ||
size='small' | ||
onClick={onClickNext} | ||
text='Next' | ||
rightIcon='chevronRight' | ||
/> | ||
<Pressable | ||
onClick={(): void => { | ||
// TODO: link to docs | ||
openLink(link || 'https://docs.adena.app/'); | ||
}} | ||
> | ||
<Row style={{ columnGap: 6 }}> | ||
<WebText type='title5' color={theme.webNeutral._600}> | ||
Learn More | ||
</WebText> | ||
<WebImg src={IconLink} size={20} /> | ||
</Row> | ||
</Pressable> | ||
</StyledContainer> | ||
); | ||
}; | ||
|
||
export default SensitiveInfoStep; |
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
49 changes: 0 additions & 49 deletions
49
packages/adena-extension/src/pages/web/account-add-screen/init-step.tsx
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
48 changes: 0 additions & 48 deletions
48
packages/adena-extension/src/pages/web/account-import-screen/init-step.tsx
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
51 changes: 0 additions & 51 deletions
51
packages/adena-extension/src/pages/web/google-login-screen/init-step.tsx
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
Oops, something went wrong.