Back to home

design-system-react/

Button

Version: 0.0.2

Last Updated: Unknown


Button

Example Usage

<Button variant="primary" reverse> Child content here </Button>

Check the Storybook story to understand more.

Notes

  • Allows icon prop to pass any React.ReactNode but really it is designed to take SVG React icon components.
  • Component allows React.ReactNode children. This is for flexibility but places onus back on user for HTML5 semantics.
  • Text color for normal and background color for reverse are determined based on the accessibility contrast ratio (AA 3.1 large text - you should aim for AAA 4.5.1 since this doesn't account for small text).

Todo List

  • Update props to enable radii prop

Install


Repository

https://github.com/okeeffed/pkg-design-system-react-button

Sections