DocSpace-buildtools/web/ASC.Web.Components/src/components/button
2020-02-03 08:50:05 +03:00
..
all.buttons.stories.js web: Components: Removed viewport from Buttons story (error on open) 2019-11-06 10:16:12 +03:00
button.stories.js web: components: Moved stories for Button and IconButton + added base tests 2019-09-06 12:44:31 +03:00
button.test.js web: Components: Added ref support to the Button component; 2020-02-02 14:01:43 +03:00
index.js Merge branch 'master' of https://github.com/ONLYOFFICE/AppServer 2020-02-03 08:50:05 +03:00
README.md web: Components: Added id, className and style property for Button component. Added tests. 2019-11-26 14:01:00 +03:00

Button

Button is used for a action on a page.

Usage

import { Button } from "asc-web-components";
<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 base Size of button
style obj, array - - - Accepts css style
tabIndex number - - -1 Button tab index