-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): fix progress bar for bs3, templates merged in ugly way
- Loading branch information
Showing
6 changed files
with
135 additions
and
7 deletions.
There are no files selected for viewing
82 changes: 82 additions & 0 deletions
82
demo/src/app/components/progressbar/demos/progressbar-demo-bs3.component.html
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,82 @@ | ||
<div *ngIf="isBs3"> | ||
<h3>Static</h3> | ||
<div class="row"> | ||
<div class="col-sm-4"> | ||
<progressbar value="55"></progressbar> | ||
</div> | ||
<div class="col-sm-4"> | ||
<progressbar class="progress-striped" value="22" type="warning">22%</progressbar> | ||
</div> | ||
<div class="col-sm-4"> | ||
<progressbar class="progress-striped active" max="200" value="166" type="danger"><i>166 / 200</i></progressbar> | ||
</div> | ||
</div> | ||
|
||
<hr/> | ||
<h3>Dynamic | ||
<button type="button" class="btn btn-sm btn-primary" (click)="random()">Randomize</button> | ||
</h3> | ||
<progressbar [max]="max" [value]="dynamic"><span style="color:white; white-space:nowrap;">{{dynamic}} / {{max}}</span> | ||
</progressbar> | ||
|
||
<small><em>No animation</em></small> | ||
<progressbar [animate]="false" [value]="dynamic" type="success"><b>{{dynamic}}%</b></progressbar> | ||
|
||
<small><em>Object (changes type based on value)</em></small> | ||
<progressbar class="progress-striped active" [value]="dynamic" [type]="type">{{type}} <i *ngIf="showWarning">!!! | ||
Watch out !!!</i></progressbar> | ||
|
||
<hr/> | ||
<h3>Stacked | ||
<button type="button" class="btn btn-sm btn-primary" (click)="randomStacked()">Randomize</button> | ||
</h3> | ||
<bs-progress> | ||
<bar *ngFor="let baz of stacked" [value]="baz.value" [type]="baz?.type"> | ||
<span *ngIf="baz.value > 5">{{baz?.value}}%</span> | ||
</bar> | ||
</bs-progress> | ||
</div> | ||
|
||
<div *ngIf="!isBs3"> | ||
<h3>In bootstrap 4 progress has a different concept, no inner text, no default transition animation</h3> | ||
<h3>Static</h3> | ||
<div class="row"> | ||
<div class="col-sm-4"> | ||
<progress class="progress" value="55" max="100"></progress> | ||
</div> | ||
<div class="col-sm-4"> | ||
<progress class="progress progress-striped" value="22" max="100" type="warning">22%</progress> | ||
</div> | ||
<div class="col-sm-4"> | ||
<progress class="progress progress-striped active" max="200" value="166" type="danger"><i>166 / 200</i></progress> | ||
</div> | ||
</div> | ||
|
||
<h3>Dynamic <button type="button" class="btn btn-sm btn-primary" (click)="random()">Randomize</button></h3> | ||
<progress class="progress progress-striped progress-animated" [max]="max" [value]="dynamic"> | ||
<span style="color:white; white-space:nowrap;">{{dynamic}} / {{max}}</span> | ||
</progress> | ||
|
||
<small><em>No animation</em></small> | ||
<progress class="progress progress-success" [value]="dynamic" [max]="100"><b>{{dynamic}}%</b></progress> | ||
|
||
<small><em>Object (changes type based on value)</em></small> | ||
<progress class="progress progress-striped progress-animated active progress-{{ type }}" [value]="dynamic" [max]="max"> | ||
{{type}} <i *ngIf="showWarning">!!! Watch out !!!</i> | ||
</progress> | ||
|
||
<hr /> | ||
<h3>Stacked <button type="button" class="btn btn-sm btn-primary" (click)="randomStacked()">Randomize</button></h3> | ||
<div class="row col-lg-12"> | ||
<!-- todo: implement as component --> | ||
<progress *ngFor="let baz of stacked" | ||
class="progress progress-{{ baz?.type }}" | ||
style="float: left;" | ||
[ngStyle]="{width: baz.value + '%'}" | ||
[value]="baz.value" [max]="baz.max"> | ||
<span *ngIf="baz.value > 3">{{baz?.value}}%</span> | ||
</progress> | ||
<!-- gray background --> | ||
<progress class="progress" value="0" max="100" style="width: 100%;"></progress> | ||
</div> | ||
</div> |
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
8 changes: 4 additions & 4 deletions
8
demo/src/app/components/progressbar/demos/progressbar-demo.component.ts
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
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