-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Progress): Progress bar component is yielded as contextual compo…
…nent
- Loading branch information
1 parent
2010b0d
commit a237379
Showing
11 changed files
with
204 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,40 @@ | ||
import Ember from 'ember'; | ||
import layout from '../templates/components/bs-progress'; | ||
|
||
/** | ||
Use to group one (or more) [Components.ProgressBar](Components.ProgressBar.html) components inside it. | ||
Component to display a Bootstrap progress bar, see http://getbootstrap.com/components/#progress. | ||
### Usage | ||
The component yields a [Components.ProgressBar)(Components.ProgressBar.html) component that represents a single bar. | ||
Use the `value` property to control the progress bar's width. To apply the different styling options supplied by | ||
Bootstrap, use the appropriate properties like `type`, `showLabel`, `striped` or `animate`. | ||
```hbs | ||
{{#bs-progress as |p|}} | ||
{{p.bar value=progressValue minValue=0 maxValue=10 showLabel=true type="danger"}} | ||
{{/bs-progress}} | ||
``` | ||
### Stacked | ||
You can place multiple progress bar components in a single progress component to | ||
create a stack of progress bars as seen in http://getbootstrap.com/components/#progress-stacked. | ||
```hbs | ||
{{#bs-progress as |p|}} | ||
{{p.bar value=progressValue1 type="success"}} | ||
{{p.bar value=progressValue2 type="warning"}} | ||
{{p.bar value=progressValue3 type="danger"}} | ||
{{/bs-progress}} | ||
``` | ||
@class Progress | ||
@namespace Components | ||
@extends Ember.Component | ||
@public | ||
*/ | ||
export default Ember.Component.extend({ | ||
layout, | ||
classNames: ['progress'] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{{yield | ||
(hash | ||
bar=(component "bs-progress/bar") | ||
) | ||
}} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from 'ember-bootstrap/components/bs-progress/bar'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.