Skip to content

Commit 7aa64df

Browse files
crisbetojosephperrott
authored andcommitted
docs(datepicker): custom datepicker header demo styling not working (#12253)
1 parent 45d6ae4 commit 7aa64df

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed
Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1 @@
1-
.example-header {
2-
display: flex;
3-
align-items: center;
4-
padding: 0.5em;
5-
}
6-
7-
.example-header-label {
8-
flex: 1;
9-
height: 1em;
10-
font-weight: bold;
11-
text-align: center;
12-
}
13-
14-
.example-double-arrow .mat-icon {
15-
margin: -22%;
16-
}
1+
/** No CSS for this example */

src/material-examples/datepicker-custom-header/datepicker-custom-header-example.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {takeUntil} from 'rxjs/operators';
1515
@Component({
1616
selector: 'datepicker-custom-header-example',
1717
templateUrl: 'datepicker-custom-header-example.html',
18-
styleUrls: ['datepicker-custom-header-example.css'],
1918
changeDetection: ChangeDetectionStrategy.OnPush,
2019
})
2120
export class DatepickerCustomHeaderExample {
@@ -25,6 +24,24 @@ export class DatepickerCustomHeaderExample {
2524
/** Custom header component for datepicker. */
2625
@Component({
2726
selector: 'example-header',
27+
styles: [`
28+
.example-header {
29+
display: flex;
30+
align-items: center;
31+
padding: 0.5em;
32+
}
33+
34+
.example-header-label {
35+
flex: 1;
36+
height: 1em;
37+
font-weight: 500;
38+
text-align: center;
39+
}
40+
41+
.example-double-arrow .mat-icon {
42+
margin: -22%;
43+
}
44+
`],
2845
template: `
2946
<div class="example-header">
3047
<button mat-icon-button class="example-double-arrow" (click)="previousClicked('year')">

0 commit comments

Comments
 (0)