bcgov / design-system

The B.C. Design System helps public sector design and development teams build consistent, accessible products
https://gov.bc.ca/designsystem
Apache License 2.0
57 stars 38 forks source link

Add Radio and RadioGroup components #472

Closed mkernohanbc closed 2 months ago

mkernohanbc commented 2 months ago

This PR adds two new components, along with examples and supporting docs:

Screenshot 2024-08-26 at 14 40 42

It is based on RAC RadioGroup and Radio.

RadioGroup is a container element, that provides visible and semantic labelling and description for a group of radio inputs. It also supports validation and error handling, via the FieldError subcomponent. It supports the following props:

Radio is a subcomponent used to populate a list of options inside a RadioGroup. It cannot be used outside a RadioGroup. It supports the following props:

mkernohanbc commented 2 months ago

@ty2k these components rely on 3.1.0 tokens, so I had to bump the dependency in 667eed9 to make things work.

ty2k commented 2 months ago

I've made the following changes:

This should be good to merge @mkernohanbc. Please take a look and make sure you're happy with my changes!

mkernohanbc commented 2 months ago

@ty2k I see no issues with any of these changes, will merge when you approve!