Skip to content

Commit

Permalink
Merge pull request #120 from sebgroup/feature/button-spinners
Browse files Browse the repository at this point in the history
fix(buttons): loading state for secondary and outline version
  • Loading branch information
hjalmers authored May 22, 2019
2 parents 05b2bee + 95a73f5 commit a89481a
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 9 deletions.
44 changes: 35 additions & 9 deletions scss/styles/_spinners.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,41 @@ $spinner-lg-size: 6rem;
}
}

.btn .spinner {
//width: 1rem;
//height: 1rem;
color: $white;
display: inline-block;
vertical-align: -3px;
&:before,
&:after {
background: $btn-disabled-color;
.btn {
.spinner {
//width: 1rem;
//height: 1rem;
color: $white;
display: inline-block;
vertical-align: -3px;
&:before,
&:after {
background: $btn-disabled-color;
}
}
&[class*=" btn-outline-"] {
.spinner-sq {
background-color: $btn-disabled-color;
}
.spinner {
color: $btn-disabled-color;
&:before,
&:after {
background: $gray-100;
}
}
}
&.btn-secondary {
.spinner-sq {
background-color: $btn-disabled-color;
}
.spinner {
color: $btn-disabled-color;
&:before,
&:after {
background: $white;
}
}
}
}

Expand Down
28 changes: 28 additions & 0 deletions src/example/components/spinners/spinners.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,34 @@ <h2 class="my-3">Spinners</h2>
</div>
</button>
</div>
<div class="col-auto">
<button class="btn btn-outline-primary disabled"><span class="mr-2">Waiting</span>
<div class="spinner" role="status">
<span class="sr-only">Loading...</span>
</div>
</button>
</div>
<div class="col-auto">
<button class="btn btn-outline-primary disabled"><span class="mr-2">Waiting</span>
<div class="spinner-sq" role="status">
<span class="sr-only">Loading...</span>
</div>
</button>
</div>
<div class="col-auto">
<button class="btn btn-secondary disabled"><span class="mr-2">Waiting</span>
<div class="spinner" role="status">
<span class="sr-only">Loading...</span>
</div>
</button>
</div>
<div class="col-auto">
<button class="btn btn-secondary disabled"><span class="mr-2">Waiting</span>
<div class="spinner-sq" role="status">
<span class="sr-only">Loading...</span>
</div>
</button>
</div>
</div>
<exemplify [selector]="'#loadersButton .btn'"></exemplify>
</div>
Expand Down

0 comments on commit a89481a

Please sign in to comment.