-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: address onboarding UI deviations #24
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
860cc35
fix: address onboarding UI deviations
ryanml ef2a435
Merge branch 'main' into fix/CP-8979
vvava 4113d77
Merge branch 'main' into fix/CP-8979
bferenc 98f7863
feat: k2 icon
vvava 279ff13
chore: remove image
vvava 28fd5c8
Merge branch 'main' into fix/CP-8979
bferenc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
90 changes: 90 additions & 0 deletions
90
src/pages/Onboarding/pages/Seedless/components/ExistingWalletOptions.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,90 @@ | ||
import { | ||
Stack, | ||
Typography, | ||
ShieldLockIcon, | ||
LedgerIcon, | ||
KeystoneIcon, | ||
ArrowLeftIconV2, | ||
} from '@avalabs/core-k2-components'; | ||
import { forwardRef, ForwardedRef } from 'react'; | ||
import { useHistory } from 'react-router-dom'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { useFeatureFlagContext } from '@src/contexts/FeatureFlagsProvider'; | ||
import { FeatureGates } from '@src/background/services/featureFlags/models'; | ||
import { OnboardingURLs } from '@src/background/services/onboarding/models'; | ||
import { Overlay } from '@src/components/common/Overlay'; | ||
import { ExistingWalletButton } from './ExistingWalletButton'; | ||
|
||
type ExistingWalletOptionsProps = { | ||
setShowExistingWalletOption: (open: boolean) => void; | ||
}; | ||
|
||
export const ExistingWalletOptions = forwardRef(function ExistingWalletOptions( | ||
{ setShowExistingWalletOption }: ExistingWalletOptionsProps, | ||
ref: ForwardedRef<HTMLDivElement> | ||
) { | ||
const history = useHistory(); | ||
const { t } = useTranslation(); | ||
const { featureFlags } = useFeatureFlagContext(); | ||
|
||
return ( | ||
<Overlay | ||
sx={{ | ||
backgroundColor: 'rgba(17, 17, 17, 0.75)', | ||
}} | ||
> | ||
<Stack | ||
ref={ref} | ||
sx={{ | ||
width: 480, | ||
alignItems: 'flex-start', | ||
rowGap: 5, | ||
position: 'fixed', | ||
top: 90, | ||
}} | ||
> | ||
<ArrowLeftIconV2 | ||
sx={{ cursor: 'pointer', width: 19, height: 14 }} | ||
onClick={() => { | ||
setShowExistingWalletOption(false); | ||
}} | ||
/> | ||
<Typography variant="h3" sx={{ textAlign: 'left' }}> | ||
{t('How would you like to access your existing wallet?')} | ||
</Typography> | ||
<Stack> | ||
<Stack sx={{ flexDirection: 'row', columnGap: 3, pb: 3 }}> | ||
<ExistingWalletButton | ||
data-testid="access-with-seed-phrase" | ||
icon={<ShieldLockIcon size={30} />} | ||
text={t('Enter recovery phrase')} | ||
onClick={() => { | ||
history.push(OnboardingURLs.SEED_PHRASE); | ||
}} | ||
/> | ||
<ExistingWalletButton | ||
data-testid="access-with-ledger" | ||
icon={<LedgerIcon size={30} />} | ||
text={t('Add using Ledger')} | ||
onClick={() => { | ||
history.push(OnboardingURLs.LEDGER); | ||
}} | ||
/> | ||
</Stack> | ||
{featureFlags[FeatureGates.KEYSTONE] && ( | ||
<Stack sx={{ flexDirection: 'row' }}> | ||
<ExistingWalletButton | ||
data-testid="access-with-seed-keystone" | ||
icon={<KeystoneIcon size={30} />} | ||
text={t('Add using Keystone')} | ||
onClick={() => { | ||
history.push(OnboardingURLs.KEYSTONE); | ||
}} | ||
/> | ||
</Stack> | ||
)} | ||
</Stack> | ||
</Stack> | ||
</Overlay> | ||
); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,10 +91,10 @@ | |
dependencies: | ||
"@avalabs/core-utils-sdk" "^3.0.0" | ||
|
||
"@avalabs/[email protected].44": | ||
version "4.18.0-alpha.44" | ||
resolved "https://registry.yarnpkg.com/@avalabs/core-k2-components/-/core-k2-components-4.18.0-alpha.44.tgz#8daf2d8ab28cc5491adbb11d36201ec91dfc4bce" | ||
integrity sha512-2oIg1SsJ7dGedpxoezOPMTJbIcMK4s+P8fu9ba6Q3ZskjhX5OJizv42H4orvQyCb5RXgN2FvxYkft6FSufNiqA== | ||
"@avalabs/[email protected].47": | ||
version "4.18.0-alpha.47" | ||
resolved "https://registry.yarnpkg.com/@avalabs/core-k2-components/-/core-k2-components-4.18.0-alpha.47.tgz#94d588cf109350fe57d246dbf36bc127a1fc0584" | ||
integrity sha512-eXgd3mgHJKHyQRGHxcQV4MJBzJT0Orr+w2xrWZ1M9dGcQBTGbOxQ5h0Y/TPRkUXrP8SVhonEM2ACX8YTSTbKDA== | ||
dependencies: | ||
"@emotion/react" "11.11.1" | ||
"@emotion/styled" "11.11.0" | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using explicit values with
rgba
to make sure the text is not transparent, only the background