Skip to content

Commit

Permalink
fix(datepicker): use class btn with btn-link
Browse files Browse the repository at this point in the history
  • Loading branch information
bastienmoulia authored and maxokorokov committed Nov 9, 2017
1 parent 2ed3632 commit 3648f46
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions src/datepicker/datepicker-navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {NgbCalendar} from './ngb-calendar';
line-height: 1.85rem;
}
:host.collapsed {
margin-bottom: -2rem;
margin-bottom: -2rem;
}
.ngb-dp-navigation-chevron::before {
border-style: solid;
Expand All @@ -27,37 +27,26 @@ import {NgbCalendar} from './ngb-calendar';
-ms-transform: rotate(-135deg);
width: 0.75em;
margin: 0 0 0 0.5rem;
}
}
.ngb-dp-navigation-chevron.right:before {
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
margin: 0 0.5rem 0 0;
}
.btn-link {
cursor: pointer;
border: 0;
outline: 0;
}
.btn-link[disabled] {
cursor: not-allowed;
opacity: .65;
}
`],
template: `
<button type="button" class="btn-link" (click)="!!doNavigate(navigation.PREV)" [disabled]="prevDisabled()" tabindex="-1">
<span class="ngb-dp-navigation-chevron"></span>
<button type="button" class="btn btn-sm btn-link" (click)="!!doNavigate(navigation.PREV)" [disabled]="prevDisabled()" tabindex="-1">
<span class="ngb-dp-navigation-chevron"></span>
</button>
<ngb-datepicker-navigation-select *ngIf="showSelect" class="d-block" [style.width.rem]="months * 9"
[date]="date"
[minDate]="minDate"
[maxDate]="maxDate"
[disabled] = "disabled"
(select)="selectDate($event)">
</ngb-datepicker-navigation-select>
<button type="button" class="btn-link" (click)="!!doNavigate(navigation.NEXT)" [disabled]="nextDisabled()" tabindex="-1">
<button type="button" class="btn btn-sm btn-link" (click)="!!doNavigate(navigation.NEXT)" [disabled]="nextDisabled()" tabindex="-1">
<span class="ngb-dp-navigation-chevron right"></span>
</button>
`
Expand Down

0 comments on commit 3648f46

Please sign in to comment.