1.6.0 • Published 4 years ago

@stone-payments/emd-basic-button v1.6.0

Weekly downloads
1
License
-
Repository
-
Last release
4 years ago

Button

Emerald Button UI component.

Usage

npm install @stone-payments/emd-basic-button
import '@stone-payments/emd-basic-button';
<emd-button abc>
  Click me
</emd-button>

<emd-button abc size="large" rank="secondary">
  Click me
</emd-button>

<emd-button>
  Click me
</emd-button>

<emd-button>
  <emd-icon slot="icon" icon="arrow-up"></emd-icon>
  Move up
</emd-button>

<emd-button loading>
  Buy now
</emd-button>

<emd-button href="http://stone.co">
  Stone Co.
</emd-button>

Attributes and Properties

abc

Applies the ABC theme to the component. The ABC mode intentionally restricts the styles that can be applied to the component. Font size, color and background can only be changed through size and rank properties in ABC mode.

  • Type: Boolean
  • Attribute and property

size

Changes the size of the component when in ABC mode. It can be large, medium or small.

  • Type: String
  • Attribute and property

rank

Changes the appearance of the component when in ABC mode. It can be primary, secondary or tertiary.

  • Type: String
  • Attribute and property

type

Defines the type of the component. It can be: button, submit or reset. This attribute is passed to the <button> element inside the component.

  • Type: String
  • Attribute and property

disabled

Disables the component.

  • Type: Boolean
  • Attribute and property

loading

Shows a loading spinner inside the component.

  • Type: Boolean
  • Attribute and property

href

Makes the component behave like an <a> tag.

  • Type: String
  • Attribute and property

target

Defines the tab where the url set in the href attribute will be loaded.

  • Type: String
  • Attribute and property

multipleclicks

Allows the component to recognize multiple clicks in a row. By default, when clicked multiple times in a row, the component will only recognize the first click.

  • Type: Boolean
  • Attribute and property

CSS Properties

--emd-button-padding

Controlls the internal padding of the button. This property doesn't work in ABC mode.

  • Default: 1.125em 1.5em

Slots

Default

The component's content. Usually some text, but it can also be an image or an icon, for example.

icon

The area on the left to the content where the optional icon goes.

Events

This component dispatches all native Button events, like click, for example.

1.6.0

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago