DocSpace-client/packages/shared/components/radio-button
2024-03-21 18:09:55 +04:00
..
index.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
RadioButton.stories.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
RadioButton.styled.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
RadioButton.test.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
RadioButton.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
RadioButton.types.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
README.md Client: fix wrong import - export for shared components 2024-01-10 11:01:43 +03:00

RadioButton

RadioButton allow you to add radiobutton

Usage

import { RadioButton } from "@docspace/shared/components/radio-button";
<RadioButton name="fruits" value="apple" label="Sweet apple" />

Properties

<RadioButtonGroup /> props supersede RadioButton props

Props Type Required Values Default Description
className string - - - Accepts class
id string - - - Accepts id
isChecked bool - - false Used as HTML checked property for each <input> tag
isDisabled bool - - false Used as HTML disabled property for each <input> tag
label string - - - Name of the radiobutton. If missed, value will be used
fontSize string - - - Font size of link
fontWeight number, string - - - Font weight of link
name string - - Used as HTML name property for <input> tag.
onClick func - - - Allow you to handle clicking events on component
orientation oneOf - vertical, horizontal horizontal Position of radiobuttons
spacing string - - 15px Margin between radiobutton. If orientation horizontal, it is margin-left(apply for all radiobuttons, except first), if orientation vertical, it is margin-bottom(apply for all radiobuttons, except last)
style obj, array - - - Accepts css style
value string - - Used as HTML value property for <input> tag. Used for identification each radiobutton
width string - - 100% Width of RadioButtonGroup container