Skip to content

Commit

Permalink
Fix wrapping of buttons with long text
Browse files Browse the repository at this point in the history
  • Loading branch information
nop33 committed Dec 16, 2024
1 parent 205a638 commit e93f792
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apps/mobile-wallet/src/components/buttons/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ const Button = ({
>
{iconProps && !(compact || squared) && <EmptyPlaceholder />}
{title && (
<AppText style={{ color: font, textAlign: 'center' }} medium size={compact ? 14 : 16}>
<ButtonText color={font} medium size={compact ? 14 : 16}>
{title}
</AppText>
</ButtonText>
)}
{children}
{loading ? (
Expand Down Expand Up @@ -258,3 +258,8 @@ const IconContainer = styled.View`
const EmptyPlaceholder = styled.View`
width: 22px;
`

const ButtonText = styled(AppText)`
text-align: center;
flex-shrink: 1;
`

0 comments on commit e93f792

Please sign in to comment.