Skip to content

Commit 98c3372

Browse files
authored
style: date picker panel row main axis between (#565)
* style: date picker panel row main axis between * Create itchy-planets-brush.md * feat: mod picker panel header separator and style
1 parent 654abd7 commit 98c3372

File tree

4 files changed

+36
-13
lines changed

4 files changed

+36
-13
lines changed

.changeset/itchy-planets-brush.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@alauda/ui": patch
3+
---
4+
5+
style: date picker panel row main axis between

src/date-picker/calendar/header/style.scss

+16-4
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,35 @@ $block: aui-calendar-header;
1313
&__nav-content {
1414
flex: 1;
1515
display: flex;
16+
flex-wrap: wrap;
1617
justify-content: center;
1718
align-items: center;
1819
font-size: use-var(font-size-l);
1920
color: use-text-color(main);
2021
font-weight: use-var(font-weight-bolder);
2122

22-
a {
23+
.separator {
24+
margin: 0 use-var(spacing-s);
25+
}
26+
27+
.aui-button--text {
2328
color: use-text-color(main);
2429

30+
.aui-button__content {
31+
font-size: use-var(font-size-l);
32+
font-weight: use-var(font-weight-bolder);
33+
padding: 0;
34+
}
35+
2536
&:hover {
37+
background-color: transparent;
2638
color: use-rgb(primary);
2739
text-decoration: none !important;
2840
}
29-
}
3041

31-
a + a {
32-
margin-left: 5px;
42+
+ .aui-button--text {
43+
margin-left: 0;
44+
}
3345
}
3446
}
3547
}

src/date-picker/calendar/header/template.html

+14-9
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,35 @@
1717
*ngIf="dateNavRange === DateNavRange.Month"
1818
[class]="bem.element('nav-content')"
1919
>
20-
<a
21-
href="javascript:;"
20+
<button
21+
aui-button="text"
2222
(click)="clickNav(DateNavRange.Year)"
2323
>
2424
{{ headerRange?.start?.year() }}{{ 'year_suffix' | auiI18n }}
25-
</a>
26-
<a
27-
href="javascript:;"
25+
</button>
26+
<div class="separator">
27+
<span *ngIf="!('year_suffix' | auiI18n) && !('month_suffix' | auiI18n)">
28+
/
29+
</span>
30+
</div>
31+
<button
32+
aui-button="text"
2833
(click)="clickNav(DateNavRange.Month)"
2934
>
3035
{{ headerRange?.start?.month() + 1 }}{{ 'month_suffix' | auiI18n }}
31-
</a>
36+
</button>
3237
</span>
3338

3439
<span
3540
*ngIf="dateNavRange === DateNavRange.Year"
3641
[class]="bem.element('nav-content')"
3742
>
38-
<a
39-
href="javascript:;"
43+
<button
44+
aui-button="text"
4045
(click)="clickNav(DateNavRange.Year)"
4146
>
4247
{{ headerRange?.start?.year() }}{{ 'year_suffix' | auiI18n }}
43-
</a>
48+
</button>
4449
</span>
4550

4651
<span

src/date-picker/calendar/panel/picker-panel.style.scss

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ $left-mask-shadow: -12px 0 0 0 use-rgb(popper-bg);
6161
flex: 1;
6262
display: flex;
6363
align-items: center;
64+
justify-content: space-between;
6465
@include text-set(m);
6566

6667
width: 100%;

0 commit comments

Comments
 (0)