feat: small style changes for Tag

add default value for background color
This commit is contained in:
RadoslavDimchev 2023-08-10 09:58:37 +03:00
parent f61f2f2e2d
commit 81ed2f1b8b
2 changed files with 9 additions and 8 deletions

View File

@ -13,7 +13,7 @@ const NodesLogo = () => {
> >
<Icon source={'src/assets/nodes-app-icon.png'} width={32} height={32} /> <Icon source={'src/assets/nodes-app-icon.png'} width={32} height={32} />
<Text style={{ fontWeight: '700', fontSize: '28px' }}>nodes</Text> <Text style={{ fontWeight: '700', fontSize: '28px' }}>nodes</Text>
<Tag bc="#2A4AF5" text="BETA" /> <Tag text="BETA" />
</XStack> </XStack>
) )
} }

View File

@ -1,25 +1,26 @@
import { Text } from 'tamagui' import { Text, XStack } from 'tamagui'
type TagProps = { type TagProps = {
bc: string bc?: string
text: string text: string
} }
const Tag = ({ bc, text }: TagProps) => { const Tag = ({ bc = '#2A4AF5', text }: TagProps) => {
return ( return (
<div <XStack
style={{ style={{
backgroundColor: bc, backgroundColor: bc,
display: 'flex', display: 'flex',
padding: '2px 6px', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
padding: '1px 6px',
borderRadius: '67px', borderRadius: '67px',
}} }}
> >
<Text fontWeight={'500'} fontSize={'9px'} color={'white'}> <Text fontWeight={'450'} fontSize={'10px'} color={'white'}>
{text} {text}
</Text> </Text>
</div> </XStack>
) )
} }