feat: small style changes for Tag
add default value for background color
This commit is contained in:
parent
f61f2f2e2d
commit
81ed2f1b8b
|
@ -13,7 +13,7 @@ const NodesLogo = () => {
|
|||
>
|
||||
<Icon source={'src/assets/nodes-app-icon.png'} width={32} height={32} />
|
||||
<Text style={{ fontWeight: '700', fontSize: '28px' }}>nodes</Text>
|
||||
<Tag bc="#2A4AF5" text="BETA" />
|
||||
<Tag text="BETA" />
|
||||
</XStack>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,25 +1,26 @@
|
|||
import { Text } from 'tamagui'
|
||||
import { Text, XStack } from 'tamagui'
|
||||
|
||||
type TagProps = {
|
||||
bc: string
|
||||
bc?: string
|
||||
text: string
|
||||
}
|
||||
|
||||
const Tag = ({ bc, text }: TagProps) => {
|
||||
const Tag = ({ bc = '#2A4AF5', text }: TagProps) => {
|
||||
return (
|
||||
<div
|
||||
<XStack
|
||||
style={{
|
||||
backgroundColor: bc,
|
||||
display: 'flex',
|
||||
padding: '2px 6px',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
padding: '1px 6px',
|
||||
borderRadius: '67px',
|
||||
}}
|
||||
>
|
||||
<Text fontWeight={'500'} fontSize={'9px'} color={'white'}>
|
||||
<Text fontWeight={'450'} fontSize={'10px'} color={'white'}>
|
||||
{text}
|
||||
</Text>
|
||||
</div>
|
||||
</XStack>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue