DocSpace-client/packages/shared/components/toggle-button
2024-03-21 18:09:55 +04:00
..
index.ts Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
README.md Shared: refactoring and apply code guide style 2023-12-05 19:52:30 +03:00
ToggleButton.stories.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
ToggleButton.styled.ts Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
ToggleButton.test.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
ToggleButton.theme.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
ToggleButton.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
ToggleButton.types.ts Replaced copyright start year + format 2024-03-21 18:09:55 +04:00

ToggleButton

Custom toggle button input

Usage

import {ToggleButton} from "@docspace/shared/components";
<ToggleButton
  label="text"
  onChange={(event) => console.log(event.target.value)}
  isChecked={false}
/>

Properties

Props Type Required Values Default Description
className string - - - Class name
id string, number - - - Set component id
isChecked bool - - - The checked property sets the checked state of a ToggleButton.
isDisabled bool - - - Disables the ToggleButton
label string - - - Label of the input
onChange func - - Will be triggered whenever an ToggleButton is clicked
style obj, array - - - Accepts css style