diff --git a/.changeset/fifty-olives-try.md b/.changeset/fifty-olives-try.md new file mode 100644 index 00000000..431d1a0e --- /dev/null +++ b/.changeset/fifty-olives-try.md @@ -0,0 +1,5 @@ +--- +'@status-im/components': patch +--- + +fix ContextTag text size diff --git a/packages/components/src/context-tag/context-tag.tsx b/packages/components/src/context-tag/context-tag.tsx index f94a47eb..e0ef2ae5 100644 --- a/packages/components/src/context-tag/context-tag.tsx +++ b/packages/components/src/context-tag/context-tag.tsx @@ -93,7 +93,13 @@ const ContextTag = (props: Props) => { const rounded = type === 'account' || type === 'collectible' const hasAvatar = type !== 'address' && type !== 'icon' && type !== 'label' - const textSize = props.size === 24 ? props.textSize : textSizes[props.size!] + + let textSize: Extract + 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 = () => { switch (type) {