DocSpace-client/packages/asc-web-components/button
Artem Tarasov 782168d3d6 Merge branch 'feature/workspaces' of github.com:ONLYOFFICE/AppServer into feature/workspaces
# Conflicts:
#	packages/asc-web-components/package.json
2021-03-08 23:21:56 +03:00
..
button.stories.js Web: Components: refactoring stories, add public/images to components for storybook 2021-03-07 14:57:26 +03:00
button.test.js Web: Components: changed component hierarchy 2021-02-24 17:42:09 +03:00
index.js Merge branch 'feature/workspaces' of github.com:ONLYOFFICE/AppServer into feature/workspaces 2021-03-08 23:21:56 +03:00
README.md Web: Components/Common: fix imports 2021-02-26 00:19:45 +03:00
styled-button.js Web: Components/Common: fix imports 2021-02-26 00:19:45 +03:00

Button

Button is used for a action on a page.

Usage

import Button from "@appserver/components/button";
<Button
  size="base"
  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 - base, middle, big, large base Size of button
style obj, array - - - Accepts css style
tabIndex number - - -1 Button tab index
minWidth string - - null Sets the min width of the button