Skip to content

Commit

Permalink
Update button sizes (#2706)
Browse files Browse the repository at this point in the history
  • Loading branch information
gustaveen authored Jul 7, 2023
1 parent f411945 commit 2358846
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
10 changes: 6 additions & 4 deletions packages/ui/src/components/Button/Button.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Level, mq } from '../../lib/media-query'
import { theme } from '../../lib/theme/theme'

const HEIGHT = {
large: '3.25rem',
large: '3.5rem',
medium: '2.5rem',
small: '2.125rem',
small: '2rem',
}

type ButtonSizeVariant = 'small' | 'medium' | 'large'
Expand Down Expand Up @@ -36,18 +36,20 @@ const SIZE_STYLES = {
height: HEIGHT.small,
paddingInline: theme.space.md,
fontSize: theme.fontSizes.xs,
borderRadius: theme.radius.xs,
},
medium: {
height: HEIGHT.medium,
paddingInline: theme.space.md,
fontSize: theme.fontSizes.md,
borderRadius: theme.radius[1],
},
large: {
height: HEIGHT.large,
width: '100%',
paddingInline: theme.space.xl,

textAlign: 'center',
fontSize: theme.fontSizes.md,
textAlign: 'center',
borderRadius: theme.radius.sm,
},
} as const
17 changes: 9 additions & 8 deletions packages/ui/src/lib/theme/radius.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
const base = {
0: 8,
1: 12,
2: 16,
3: 20,
4: 28,
1: 10,
2: 12,
3: 16,
4: 20,
5: 28,
} as const

export const radius = {
...base,

// Aliases
xs: base[0],
sm: base[1],
md: base[2],
lg: base[3],
xl: base[4],
sm: base[2],
md: base[3],
lg: base[4],
xl: base[5],
}

2 comments on commit 2358846

@vercel
Copy link

@vercel vercel bot commented on 2358846 Jul 7, 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:

onboarding – ./apps/onboarding

onboarding-hedvig.vercel.app
racoon-onboarding.vercel.app
onboarding-git-main-hedvig.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 2358846 Jul 7, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.