fix ContextTag text size (#475)

* fix ContextTag text size

* add changeset
This commit is contained in:
Felicio Mununga 2023-09-13 14:01:52 +02:00 committed by GitHub
parent abac11dfb4
commit 024c19f203
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
'@status-im/components': patch
---
fix ContextTag text size

View File

@ -93,7 +93,13 @@ const ContextTag = (props: Props) => {
const rounded = type === 'account' || type === 'collectible' const rounded = type === 'account' || type === 'collectible'
const hasAvatar = type !== 'address' && type !== 'icon' && type !== 'label' const hasAvatar = type !== 'address' && type !== 'icon' && type !== 'label'
const textSize = props.size === 24 ? props.textSize : textSizes[props.size!]
let textSize: Extract<TextProps['size'], 13 | 15>
if (size === 24) {
textSize = 'textSize' in props ? props.textSize : 13 // default if props.size not set but fallbacked to 24
} else {
textSize = textSizes[size]
}
const renderContent = () => { const renderContent = () => {
switch (type) { switch (type) {