Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 901 Bytes

button.md

File metadata and controls

39 lines (29 loc) · 901 Bytes

< Back to Components List

Button

polaris-button implements the Polaris Button component.

In the future we intend to extend this component to be more Ember-friendly by adding support for link-to behavior; however, this is not yet implemented. In the meantime we suggest using something like ember-transition-helper to achieve the same result.

Examples

Basic button:

{{#polaris-button onClick=(action "doSomething")}}
  Push me!
{{/polaris-button}}

Slim external link:

{{#polaris-button
  url="www.example.com"
  external=true
  size="slim"
}}
  I'm a link
{{/polaris-button}}

Loading button with a spinner:

{{polaris-button
  text="Load something"
  loading=isLoading
  onClick=(action (mut isLoading) true)
}}