We need a radio button field that allows users to select one option from a predefined set of options.
For this first iteration we'll need to accept props for :
label (string)
selected (mixed)
choices *
onChange (function)
helpText (callback function - should take the value that has changed as an argument)
error (string)
name (string)
The choices prop should accept an array of choice objects. Each object should have the following fields:
label (string)
helpText (string)
value (string)
disabled (boolean)
Styling should be informed by the TailwindUI styles found here:
We need a radio button field that allows users to select one option from a predefined set of options.
For this first iteration we'll need to accept props for :
label (string) selected (mixed) choices * onChange (function) helpText (callback function - should take the value that has changed as an argument) error (string) name (string)
The choices prop should accept an array of choice objects. Each object should have the following fields:
label (string) helpText (string) value (string) disabled (boolean)
Styling should be informed by the TailwindUI styles found here:
https://tailwindui.com/components/application-ui/forms/form-layouts
This is the underlying static HTML with TailwindCSS classes for this field type: