0.5.2 • Published 4 years ago

@bdt-component-library/radio v0.5.2

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Radio Component

About

This is a component published as its own package from our component library monorepo: https://github.com/BenefitsDataTrust/ui-components. Setup instructions, as well as higher-level goals and concerns can be found from the main project README.

Description

Handles display of radio buttons according to style guide conventions.

API

proptyperequireddefaultexplanation
classNamestringno""Adds an optional classname to the component
labelstringyesnoText for input label
idstringyesnoInput id attr
namestringyesnoInput name attr
valuestringyesnoInput value
disabledbooleannofalseDetermines input disabled state
checkedbooleanyesfalseDetermines input disabled state
isRequiredbooleannofalseDetermines if the input is required
hasErrorbooleannofalseDetermines if the radio is in an error state
inputRefanynonoReact ref for input
onChangefunction(e: event)noundefinedEvent handler for onchange events
onClickfunction(e: event)no() => {}Event handler for onclick event on the radio input
testIdstringno""Allows an id to be added for testing purposes via the data-testid attr
0.5.2

4 years ago

0.5.0

4 years ago

0.5.1

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago