Button Updates #36
Reference in New Issue
Block a user
Delete Branch "adilallo/component/ButtonUpdates"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Update Button Component: Variant Renames, Sizing, and Alert Close Button
Overview
This PR updates the Button component to align with Figma design specifications. It includes comprehensive variant renames to match design system naming conventions, updates to button sizing and spacing across all sizes, and improvements to the alert close button styling with hover states. All component references throughout the codebase have been updated to use the new variant names, and visual regression snapshots have been updated to reflect the new button dimensions.
Changes
Button Variant Renames
default→filledprimary→filled-inversesecondary→ghostinverse→ghost-inverseoutlined→outlinedark→outline-inverseButton Sizing and Spacing
xsmall,small,medium,large,xlarge) to match Figma specifications--spacing-scale-*)border-[1.5px]) across all states to prevent layout shiftsComponent Updates
ghostvariant atlargesize with hover color change tovar(--color-content-default-primary)primarytofilled-inverseand hero variant tofilleddefaulttofilledandprimarytofilled-inversedefaulttofilledandoutlinedtooutlinesecondarytoghostoutlinedtooutlinedefaulttofilledandoutlinedtooutline; configured responsive variants (filled for first two breakpoints, outline for next two)Storybook Updates
Design Token Updates
--color-surface-default-brand-primaryto use--color-yellow-yellow1000for filled-inverse active stateTest Updates
How to Test
Run Storybook:
npm run storybookand navigate to Button component storiesfilled,filled-inverse,ghost,ghost-inverse,outline,outline-inverse,danger,danger-inversexsmall,small,medium,large,xlargeComponent Preview Page:
npm run devand navigate to/components-previewAlert Components: Test alert toast and banner components
ghostvariant atlargesizevar(--color-content-default-primary)Responsive Testing: Test across breakpoints
NumberedCardsshows "filled" variant for first two breakpoints ("Create CommunityRule" text)NumberedCardsshows "outline" variant for next two breakpoints ("See How It Works" text)filledvariant at all breakpointsRun Test Suite:
npm test && npm run test:e2eAccessibility:
Notes
border-[1.5px](transparent by default where needed) to prevent layout shifts when borders appear on hover/focus/active states.