Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Before you could not add text to progessbars. With this minor fix you ca... #121

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/templates/components/bs-progressbar.hbs
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
<span class="sr-only">{{progress}}% Complete</span>
{{#if template}}
{{yield}}
{{else}}
<span class="sr-only">{{progress}}% Complete</span>
{{/if}}
23 changes: 23 additions & 0 deletions app/templates/showcase/show_components/progressbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,27 @@ Multiple bars can be placed into the same _bs-progress_ to stack them:
\{\{bs-progressbar type="warning" progress="20"\}\}
\{\{bs-progressbar type="danger" progress="10"\}\}
\{\{/bs-progress\}\}
```

## With label

A label can be added to the progress bar as mentioned
[here](http://getbootstrap.com/components/#progress-label). That works by using
_bs-progress_ and _bs-progressbar_ as block helpers. The inner content will be
displayed as label.

<div class="bs-example">
{{#bs-progress}}
{{#bs-progressbar type="success" progress="100"}}
custom label
{{/bs-progressbar}}
{{/bs-progress}}
</div>

``` html
\{\{#bs-progress\}\}
\{\{#bs-progressbar type="success" progress="100"\}\}
custom label
\{\{/bs-progressbar\}\}
\{\{/bs-progress\}\}
```