fix ContextTag text selection (#492)

* add default curors to ContextTag

* Create wise-readers-accept.md

* f

* f
This commit is contained in:
Felicio Mununga 2023-10-20 14:40:44 +02:00 committed by GitHub
parent 1323989f83
commit 29b9734a56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 3 deletions

View File

@ -0,0 +1,5 @@
---
"@status-im/components": patch
---
add default curors to ContextTag

View File

@ -214,6 +214,7 @@ const Avatar = (props: AvatarProps) => {
size={textSizes[props.size]}
weight="medium"
color="$white-100"
select={false}
>
{props.name.slice(0, 2).toUpperCase()}
</Text>
@ -264,6 +265,7 @@ const Avatar = (props: AvatarProps) => {
size={textSizes[props.size]}
weight="medium"
color="$white-100"
select={false}
>
{props.name.slice(0, 2).toUpperCase()}
</Text>
@ -271,11 +273,15 @@ const Avatar = (props: AvatarProps) => {
)
case 'channel':
if (props.emoji) {
return <Text size={channelEmojiSizes[props.size]}>{props.emoji}</Text>
return (
<Text size={channelEmojiSizes[props.size]} select={false}>
{props.emoji}
</Text>
)
}
return (
<Text size={textSizes[props.size]}>
<Text size={textSizes[props.size]} select={false}>
{props.name.slice(0, 1).toUpperCase()}
</Text>
)

View File

@ -92,7 +92,13 @@ const Label = (props: {
const { children, size, type = 'default' } = props
return (
<Text size={size} weight="medium" color="$neutral-100" type={type}>
<Text
size={size}
weight="medium"
color="$neutral-100"
type={type}
select={false}
>
{children}
</Text>
)
@ -288,6 +294,7 @@ const Base = styled(View, {
display: 'inline-flex',
flexDirection: 'row',
alignItems: 'center',
cursor: 'default',
variants: {
outline: {

View File

@ -15,6 +15,7 @@ type Props = {
color?: ColorTokens | string
truncate?: boolean
wrap?: false
select?: false
} & (
| { size: 88; weight?: Weight }
| { size: 64; weight?: Weight }
@ -131,6 +132,12 @@ const Base = styled(BaseText, {
minWidth: 0,
},
},
select: {
false: {
userSelect: 'none',
},
},
} as const,
defaultVariants: {