Closed mkernohanbc closed 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.
I've made the following changes:
@rollup/rollup-linux-x64-gnu
to optionalDependencies
to fix this broken build (see https://github.com/npm/cli/issues/4828#top)RadioProps
gets used and exported directly from React Aria Components f12768cflexWrap
prop added to RadioGroup to allow wrapping with horizontal groups df94906RadioGroupRenderProps
type info to render props in RadioGroup e514c1bprefer-reduced-motion
set 274d084 (we should do this to Switch as well)flexWrap
argType to meta c254509This should be good to merge @mkernohanbc. Please take a look and make sure you're happy with my changes!
@ty2k I see no issues with any of these changes, will merge when you approve!
This PR adds two new components, along with examples and supporting docs:
RadioGroup
Radio
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 theFieldError
subcomponent. It supports the following props:label
description
children
(expects an array ofRadio
components)orientation
(defaults tovertical
, also acceptshorizontal
)defaultValue
(sets an uncontrolled default value)errorMessage
isDisabled
(disables the entire radio group)isReadOnly
isInvalid
Radio
is a subcomponent used to populate a list of options inside aRadioGroup
. It cannot be used outside aRadioGroup
. It supports the following props:value
(required unique identifier, used byRadioGroup
for validation and submission)children
(used to set the label text)isDisabled
(disables an individual item)