0.3.0 • Published 9 years ago

ember-button-select v0.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

ember-button-select

A button select component for your ember app.

Installation

# From within your ember-cli project
ember install:addon ember-button-select

Usage

In your template:

{{#button-select selected=period}}
  {{#button-option value='week'}}Week{{/button-option}}
  {{#button-option value='month'}}Month{{/button-option}}
  {{#button-option value='year'}}Year{{/button-option}}
{{/button-select}}

{{!-- OR --}}
{{#button-select selected=period}}
  {{button-option label='Week' value='week'}}
  {{button-option label='Month' value='month'}}
  {{button-option label='Year' value='year'}}
{{/button-select}}

When one of the button options is selected, it will have the 'selected' class set on it. In addition, the selected binding that gets passed into the button-select component will be updated to the selected buttons value.

Styling is left completely to you.