@real-system/radio-group
v0.0.46
Published
Radio group components for real system.
Downloads
19
Readme
Installation
# install peer dependencies
# npm
$ npm install react react-dom @real-system/elements-primitive @real-system/flex @real-system/a11y-library @real-system/state-library @real-system/styled-library @real-system/utils-library @real-system/visually-hidden
# yarn
$ yarn add react react-dom @real-system/elements-primitive @real-system/flex @real-system/a11y-library @real-system/state-library @real-system/styled-library @real-system/utils-library @real-system/visually-hidden
# install radio
# npm
$ npm install @real-system/radio-group
# yarn
$ yarn add @real-system/radio-group
Code Example
import { RadioGroup } from '@real-system/radio-group';
// or
// import { RadioGroup, Radio } from '@real-system/radio-group';
const MyComponent = () => {
return (
<RadioGroup label="Favorite pet" {...args}>
<RadioGroup.Radio value="dog">Dog</RadioGroup.Radio>
<RadioGroup.Radio value="cat">Cat</RadioGroup.Radio>
<RadioGroup.Radio value="fish">Fish</RadioGroup.Radio>
<RadioGroup.Radio value="hamster" disabled>
Hamster
</RadioGroup.Radio>
</RadioGroup>
)
}
...