Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(components): rewrite Selector components (#560)
* feat(components): rewrite the Selector as radio/checkbox This makes the Selector component accessible (it wasn't before). It also brings the API inline with the Checkbox and RadioButton components. Furthermore, it allows for multiple options to be selected. BREAKING CHANGE: The Selector component now accepts the onChange, value, name, and checked props. The onClick and selected props have been removed. ISSUES CLOSED: #544 * feat(components): increase color contrast on Selector ISSUES CLOSED: #544 * feat(components): add SelectorGroup component The SelectorGroup is a convenience component to display multiple, related Selector components in an accessible way. The component API is modelled after the RadioButtonGroup component, so they can be used interchangeably. * fix(components): remove unnecessary attributes from Checkbox and RadioButton labels The value and name attributes are not valid HTML attributes on the label element. * feat(components): rename label prop for RadioButtonGroup options The options that are passed to a RadioButtonGroup should include a children prop instead of a label prop. This brings it in line with the RadioButton and SelectorGroup components. BREAKING CHANGE: The label property of the options prop of the RadioButtonGroup component has been renamed to children. * test(components): update storyshots * refactor(docs): don't persist event unnecessarily
- Loading branch information