DocSpace-client/packages/components/button
2023-11-10 11:20:02 +04:00
..
button.stories.js Merge branch 'develop' into feature/rtl-interface-direction 2023-07-06 17:34:12 +02:00
button.test.js Web:Components:Button Fix test button 2022-11-09 17:04:38 +05:00
index.js Fixed paths 2023-11-10 11:20:02 +04:00
README.md Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
styled-button.js Web: Components: Increase font in Components when rtl 2023-11-09 17:43:16 +01:00

Button

Button is used for a action on a page.

Usage

import Button from "@docspace/components/button";
<Button
  size="extraSmall"
  isDisabled={false}
  onClick={() => alert("Button clicked")}
  label="OK"
/>

Properties

Props Type Required Values Default Description
className string - - - Accepts class
icon node - - null Icon node element
id string - - - Accepts id
isClicked bool - - false Tells when the button should present a clicked state
isDisabled bool - - false Tells when the button should present a disabled state
isHovered bool - - false Tells when the button should present a hovered state
isLoading bool - - false Tells when the button should show loader icon
label string - - - Button text
onClick func - - - What the button will trigger when clicked
primary bool - - false Tells when the button should be primary
scale bool - - false Scale width of button to 100%
size oneOf - extraSmall, small, normal, medium extraSmall Size of button. The normal size equals 36px and 40px in height on the Desktop and Touchcreen devices
style obj, array - - - Accepts css style
tabIndex number - - -1 Button tab index
minWidth string - - null Sets the min width of the button