DocSpace-client/web/ASC.Web.Components/example/stories/buttons/all
2019-05-23 10:13:03 +03:00
..
all.buttons.stories.js web: Refactoring: 2019-05-21 16:40:24 +03:00
README.md web: Applied changes on isDisabled property of Button component 2019-05-23 10:13:03 +03:00

Buttons: Button

Usage

import { Button } from 'asc-web-components';

Description

Buttons are used for a action on a page.

Usage

<Button primary={true} size='big' isDisabled={true} onClick={() => alert('Button clicked')}>Save message</Button>

Properties

Props Type Required Values Default Description
primary bool - - - Tells when the button should be primary
isDisabled bool - - - Tells when the button should present a disabled state
onClick func - - What the button will trigger when clicked
size oneOf - base, middle, big, huge base -

The component further forwards all data- and aria- attributes to the underlying button component.

Main Functions and use cases are:

  • Primary action example: Save changes

  • Not primary action example: Cancel

  • Affirming affects example: Submit a form

  • Attracting attention example: Add a discount rule