Skip to content

Commit

Permalink
fix ContextTag text size (#475)
Browse files Browse the repository at this point in the history
* fix ContextTag text size

* add changeset
  • Loading branch information
felicio authored Sep 13, 2023
1 parent abac11d commit 024c19f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fifty-olives-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@status-im/components': patch
---

fix ContextTag text size
8 changes: 7 additions & 1 deletion packages/components/src/context-tag/context-tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<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 = () => {
switch (type) {
Expand Down

2 comments on commit 024c19f

@vercel
Copy link

@vercel vercel bot commented on 024c19f Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

status-components – ./packages/components

status-components.vercel.app
status-components-git-main-status-im-web.vercel.app
status-components-status-im-web.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 024c19f Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

status-web – ./apps/web

status-web-git-main-status-im-web.vercel.app
status-web.vercel.app
status-web-status-im-web.vercel.app

Please sign in to comment.