Skip to content

Commit

Permalink
fix(ButtonV2): fit root width to content size
Browse files Browse the repository at this point in the history
Closes UXD-1674
  • Loading branch information
ajkl2533 committed Nov 26, 2024
1 parent 516c755 commit 51c40d0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/ButtonV2/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const ButtonV2Plain = <E extends ElementType = 'button'>(
: size === 'sm'
? 'var(--sscds-space-2x)'
: 'var(--sscds-space-3x)',
'--sscds-button-width': isExpanded ? '100%' : 'auto',
'--sscds-button-width': isExpanded ? '100%' : 'fit-content',
'--sscds-button-width-min':
typeof minWidth !== 'undefined' ? pxToRem(minWidth) : 'auto',
'--sscds-button-height': getButtonSize(size),
Expand Down

0 comments on commit 51c40d0

Please sign in to comment.