Skip to content

Commit

Permalink
fix: prevent hugWidth from being spread on the button (#2173)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelAlev authored Jan 23, 2025
1 parent 74cf1f6 commit 964730a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/nasty-icons-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@frontify/fondue-components": patch
---

fix: prevent `hugWidth` from being spread on the `button`
3 changes: 2 additions & 1 deletion packages/components/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const Button = forwardRef<HTMLButtonElement | null, ButtonProps>(
'data-test-id': dataTestId = 'fondue-button',
className = '',
onPress = () => {},
hugWidth = true,
...props
}: ButtonProps,
ref: ForwardedRef<HTMLButtonElement | null>,
Expand All @@ -88,7 +89,7 @@ export const Button = forwardRef<HTMLButtonElement | null, ButtonProps>(
form={form}
data-test-id={dataTestId}
className={cn(
buttonStyles({ size, variant, ...props }),
buttonStyles({ size, variant, hugWidth, ...props }),
textStyles({ variant, ...props }),
iconStyles({ variant, ...props }),
className,
Expand Down

0 comments on commit 964730a

Please sign in to comment.