0.4.6 • Published 4 years ago

@bdt-component-library/toggle v0.4.6

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

Toggle 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 toggles according to style guide.

API

proptyperequireddefaultexplanation
classNamestringno""Adds an optional classname to the label
idstringyesnoInput id attr
testIdstringno""Adds an optional data-testid for testing purposes
valuestringnonoInput value
helperTextstringnonoInput helper text
onChangefunction(e: event)no() => {}Event handler for onchange events
onClickfunction(e: event)no() => {}Event handler for onclick event on the toggle switch
inputRefanynonoReact ref for input
hasErrorbooleannofalseDetermines if the input is in an error state
hasSuccessbooleannofalseDetermines if the input is in a success state
disabledbooleannofalseDetermines if the input is in a disabled state
requiredbooleannofalseDetermines if the input is required
checkedbooleannofalseDetermines the checked status of the input
0.4.6

4 years ago

0.4.5

4 years ago

0.4.4

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.6

4 years ago

0.1.4

4 years ago

0.1.5

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago