DocSpace-client/packages/components/toggle-button
2023-04-25 18:38:27 +03:00
..
index.js Merge branch 'develop' into bugfix/storybook-fixes 2023-04-20 13:23:32 +04:00
README.md
styled-toggle-button.js Web: Correcting the absence of the background of the button when isChecked in the storybook. 2023-02-08 10:34:02 +03:00
toggle-button.stories.js Web: Components: Fixed stories property`s issues 2023-04-25 18:38:27 +03:00
toggle-button.test.js

ToggleButton

Custom toggle button input

Usage

import ToggleButton from "@docspace/components/toggle-button";
<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