mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-08 09:34:40 +00:00
Create OsCard.tsx
This commit is contained in:
parent
4f868791fd
commit
19e4470a10
@ -0,0 +1,36 @@
|
|||||||
|
import { Stack, YStack } from 'tamagui'
|
||||||
|
import { Text } from '@status-im/components'
|
||||||
|
|
||||||
|
import Icon from '../../../../components/General/Icon'
|
||||||
|
|
||||||
|
type OsCardProps = {
|
||||||
|
name: string
|
||||||
|
icon: string
|
||||||
|
onClick?: () => void
|
||||||
|
isSelected?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
const OsCard = ({ name, icon, onClick, isSelected }: OsCardProps) => {
|
||||||
|
return (
|
||||||
|
<YStack
|
||||||
|
style={{
|
||||||
|
backgroundColor: isSelected ? '#2A4AF50D' : 'none',
|
||||||
|
border: isSelected ? '1px solid #2A4AF566' : '1px solid rgba(0, 0, 0, 0.15);',
|
||||||
|
borderRadius: '16px',
|
||||||
|
padding: '12px 16px',
|
||||||
|
width: '33%',
|
||||||
|
}}
|
||||||
|
space={'$12'}
|
||||||
|
onPress={onClick}
|
||||||
|
>
|
||||||
|
<Stack>
|
||||||
|
<Text size={27} weight={'semibold'}>
|
||||||
|
{name}
|
||||||
|
</Text>
|
||||||
|
</Stack>
|
||||||
|
<Icon src={icon} width={100} height={100} />
|
||||||
|
</YStack>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default OsCard
|
Loading…
x
Reference in New Issue
Block a user