DocSpace-buildtools/packages/components/toggle-button
2023-04-04 14:17:19 +05:00
..
index.js Web:Components Added a toggle button in the context menu and disabled animation in the toggle button 2023-04-04 14:17:19 +05:00
README.md Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
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: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
toggle-button.test.js Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00

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