-
Notifications
You must be signed in to change notification settings - Fork 12
feat(import): next gen import keystore #351
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
Conversation
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.
✨
const Light = () => { | ||
return <img src={LightImage} alt="File Image" width={44} height={51} />; | ||
}; | ||
|
||
const Dark = () => { | ||
return <img src={DarkImage} alt="File Image" width={44} height={51} />; | ||
}; | ||
|
||
export const FileImage = () => { | ||
const theme = useTheme(); | ||
|
||
const image = theme.palette.mode === 'light' ? <Light /> : <Dark />; | ||
|
||
return image; |
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.
The file can be simplified even more:
const Light = () => { | |
return <img src={LightImage} alt="File Image" width={44} height={51} />; | |
}; | |
const Dark = () => { | |
return <img src={DarkImage} alt="File Image" width={44} height={51} />; | |
}; | |
export const FileImage = () => { | |
const theme = useTheme(); | |
const image = theme.palette.mode === 'light' ? <Light /> : <Dark />; | |
return image; | |
export const FileImage = () => { | |
const theme = useTheme(); | |
const image = theme.palette.mode === 'light' ? LightImage : DarkImage | |
return <img src={Image} alt="File Image" width={44} height={51} />; |
This way you don't need to remember to sync width and height of multiple components
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
alignItems: 'center', | ||
columnGap: '11px', |
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.
Please use design system responsive values instead of the fixed ones
columnGap: '11px', | |
<Stack | |
sx={{ | |
flexDirection: 'row', | |
justifyContent: 'space-between', | |
alignItems: 'center', | |
columnGap: theme => theme.spacing(1.25) | |
}} |
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.
also, for the container components (Box, Stack & Grid) there's no need to use sx
prop, because they export most of css properties as own props.
The notation is more concise and impacts the memory less
<Stack
direction="row"
justifyContent='space-between"
alignItems="center"
columnGap={1.25}
>
Description
Ticket: https://ava-labs.atlassian.net/browse/CP-11431
Changes
This is going to allow the user to import account using keystore files.
2 issues that we need to solve later in k2-alpine:
The toast styling is off.
Icon used for the "Upload" page uses MdFileUpload for now as a placeholder icon.
Testing
You will need a keystore file.
If you do not have one, please talk to Ibrahim. He was able to share his test keystore file for me.
Please try importing the keystore file.
Screenshots:
Screen.Recording.2025-07-23.at.14.49.21.mov
Checklist for the author
Tick each of them when done or if not applicable.