API Docs 0.11.3.33c7ec07

Component to implement the responsive menu toggle behavior in a Components.Navbar component. Have a look there for examples.

The button toggle property will always be set to true in this component.

Show:

Methods

click

protected

Click handler. This will send the default "action" action, with the following parameters:

  • value of the button (that is the value of the "value" property)
  • original event object of the click event
  • callback: call that with a promise object, and the buttons state will automatically set to "pending", "resolved" and/or "rejected"

When using closure actions just return the promise instead of calling the above mentioned callback.

Parameters:

  • evt Object

resetState

protected

This will reset the state property to 'default', and with that the button's label to defaultText

Properties

active boolean

public

Set the 'active' class to apply active/pressed CSS styling

Default: false

block boolean

public

Property for block level buttons

See the Bootstrap docs

Default: false

buttonType String

public

Set the type of the button, either 'button' or 'submit'

Default: 'button'

classTypePrefix String

protected

Inherited from Mixins.TypeClass but overwritten in addon/components/bs-button.js:86

Default: 'btn'

defaultText string

public

Default label of the button. Not need if used as a block component

disabled boolean

public

Property to disable the button

Default: false

icon String

protected

Class(es) (e.g. glyphicons or font awesome) to use as a button icon This will render a element in front of the button's label

iconActive String

public

If button is active and this is set, the icon property will match this property

iconInactive String

public

If button is inactive and this is set, the icon property will match this property

reset boolean

public

Set this to true to reset the state. A typical use case is to bind this attribute with ember-data isDirty flag.

size String

public
Property for size styling, set to 'lg', 'sm' or 'xs' Also see the [Bootstrap docs](http://getbootstrap.com/css/#buttons-sizes)

textState String

protected

State of the button. The button's label (if not used as a block component) will be set to the <state>Text property. This property will automatically be set when using a click action that supplies the callback with an promise

Default: 'default'

title string

public

The HTML title attribute

toggle boolean

public

If toggle property is true, clicking the button will toggle the active state

Default: false

type String

public
Property for type styling For the available types see the [Bootstrap docs](http://getbootstrap.com/css/#buttons-options) (use without "btn-" prefix)

Default: 'default'

value any

public

Supply a value that will be associated with this button. This will be send as a parameter of the default action triggered when clicking the button