-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Milestone
Description
Task Description ✏️
Implement the Button component as part of the design system epic #40.
The Button will serve as a reference component for the design system, using design tokens for colors, typography, spacing, and border radii. It will support variants, sizes, optional icons, loading state, and fullWidth while inheriting styled-system props.
Acceptance Criteria ✅
-
Buttoncomponent implemented usingstyled(button)with token-based styling. - Supports
variantprop (contained,outlined,text) mapped to theme tokens. - Supports
colorprop (primary,secondary,success,error,info,warning) mapped to theme tokens. - Supports
sizeprop (small,medium,large) mapped to spacing, padding, and font size tokens. - Supports optional
startIconandendIconprops for icon placement. - Supports
fullWidthprop for stretching button to container width. - Supports
disabledprop for disabling the button. - Supports
loadingprop to show a loading indicator and disable the button. - Supports
loadingIndicatorprop to customize the loader element (default<CircularProgress size={16} />). - Supports
loadingPositionprop (start,end,center). - Inherits styled-system props from base primitive.
- Unit tests verify rendering of children, variant, size, color, icons, loading, and fullWidth props.
- Storybook stories demonstrate Button variants, sizes, icons, loading state, and fullWidth usage.
- No raw CSS values — all styles derived from theme tokens.
- Code passes linting, typing, and CI checks.
Dependencies 🔗
No response
Definition of Ready (DoR) 📋
- Task is independent and scoped to the
Buttoncomponent. - Base primitives and theme tokens are implemented and available.
- Variants, colors, and sizes for Button are defined.
- Props to be supported by Button are agreed upon (
variant,size,color,startIcon,endIcon,fullWidth,disabled,loading,loadingIndicator,loadingPosition).
Definition of Done (DoD) 🏁
-
Buttoncomponent implemented with variant, size, and color support. - Icon props (
startIcon,endIcon) render correctly. - Loading state works correctly with indicator and position.
-
fullWidthanddisabledprops work correctly. - Unit tests cover children, variants, sizes, colors, icons, loading, and fullWidth behavior.
- Storybook stories demonstrate all variants, sizes, icon placements, loading state, and fullWidth.
- Code reviewed, linted, typed, and passes CI checks.
- Documentation updated in Storybook for Button usage.
- Component is ready for reuse across the design system.
Additional Notes or Resources 📎
No response