feat(keystore-card): create selected design

This commit is contained in:
RadoslavDimchev 2024-02-21 08:41:43 +02:00 committed by Emil Ivanichkov
parent 767f300710
commit 133f7641f0
3 changed files with 14 additions and 3 deletions

View File

@ -37,7 +37,7 @@ const MigratePanel = () => {
</Text> </Text>
</div> </div>
</YStack> </YStack>
<KeystoreBackupsCard /> <KeystoreBackupsCard isSelected={true} />
<div style={{ width: '100%' }}> <div style={{ width: '100%' }}>
{isVisibleWarning && ( {isVisibleWarning && (
<InformationBox <InformationBox

View File

@ -17,3 +17,9 @@ type Story = StoryObj<typeof meta>
export const Default: Story = { export const Default: Story = {
args: {}, args: {},
} }
export const Selected: Story = {
args: {
isSelected: true,
},
}

View File

@ -1,7 +1,11 @@
import { Text } from '@status-im/components' import { Text } from '@status-im/components'
import { XStack, YStack } from 'tamagui' import { XStack, YStack } from 'tamagui'
const KeystoreBackupsCard = () => { type KeystoreBackupsCardProps = {
isSelected?: boolean
}
const KeystoreBackupsCard = ({ isSelected }: KeystoreBackupsCardProps) => {
const downloadKeyFilesHandler = () => { const downloadKeyFilesHandler = () => {
const element = document.createElement('a') const element = document.createElement('a')
const file = new Blob([''], { type: 'text/plain' }) const file = new Blob([''], { type: 'text/plain' })
@ -14,7 +18,8 @@ const KeystoreBackupsCard = () => {
return ( return (
<YStack <YStack
style={{ style={{
border: '1px solid #DCE0E5', backgroundColor: isSelected ? '#f4f6fe' : '#fff',
border: `1px solid ${isSelected ? '#2A4AF566' : '#DCE0E5'}`,
borderRadius: '16px', borderRadius: '16px',
padding: '9px 16px', padding: '9px 16px',
cursor: 'pointer', cursor: 'pointer',