Skip to content

Commit

Permalink
feat(plex-options): cambia button por plex-button
Browse files Browse the repository at this point in the history
  • Loading branch information
palita1991 committed Apr 12, 2022
1 parent b4b553b commit eb05037
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
19 changes: 14 additions & 5 deletions src/lib/css/plex-options.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
plex-options {
.options-container {
display: flex;
}

.option-grow {
plex-button {
flex-grow: 1;

&.active {
button {
color: #fff;
background-color: #0082ad;
background-image: none;
border-color: #007aa3;
}
}

button {
width: 100%;
}
}
}
17 changes: 7 additions & 10 deletions src/lib/options/options.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@ export interface IPlexOptionsItems {
@Component({
selector: 'plex-options',
template: `
<div class="row">
<div class="d-flex col flex-wrap">
<ng-container *ngFor="let item of items">
<button class="btn btn-primary btn-sm option-grow m-0" (click)="onOptionsClick(item)" [class.active]="active === item.key">
{{ item.label }}
</button>
</ng-container>
<div class="row">
<div class="d-flex col flex-wrap">
<ng-container *ngFor="let item of items">
<plex-button type="info" size="sm" label="{{ item.label }}" (click)="onOptionsClick(item)" [class.active]="active === item.key"></plex-button>
</ng-container>
</div>
</div>
</div>
`
})
`})
export class PlexOptionsComponent implements OnInit, OnChanges {

/**
Expand Down

0 comments on commit eb05037

Please sign in to comment.