Skip to content

Commit

Permalink
style: date picker panel row main axis between (#565)
Browse files Browse the repository at this point in the history
* style: date picker panel row main axis between

* Create itchy-planets-brush.md

* feat: mod picker panel header separator and style
  • Loading branch information
yangxiaolang authored Jun 13, 2024
1 parent 654abd7 commit 98c3372
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-planets-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@alauda/ui": patch
---

style: date picker panel row main axis between
20 changes: 16 additions & 4 deletions src/date-picker/calendar/header/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,35 @@ $block: aui-calendar-header;
&__nav-content {
flex: 1;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
font-size: use-var(font-size-l);
color: use-text-color(main);
font-weight: use-var(font-weight-bolder);

a {
.separator {
margin: 0 use-var(spacing-s);
}

.aui-button--text {
color: use-text-color(main);

.aui-button__content {
font-size: use-var(font-size-l);
font-weight: use-var(font-weight-bolder);
padding: 0;
}

&:hover {
background-color: transparent;
color: use-rgb(primary);
text-decoration: none !important;
}
}

a + a {
margin-left: 5px;
+ .aui-button--text {
margin-left: 0;
}
}
}
}
Expand Down
23 changes: 14 additions & 9 deletions src/date-picker/calendar/header/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,35 @@
*ngIf="dateNavRange === DateNavRange.Month"
[class]="bem.element('nav-content')"
>
<a
href="javascript:;"
<button
aui-button="text"
(click)="clickNav(DateNavRange.Year)"
>
{{ headerRange?.start?.year() }}{{ 'year_suffix' | auiI18n }}
</a>
<a
href="javascript:;"
</button>
<div class="separator">
<span *ngIf="!('year_suffix' | auiI18n) && !('month_suffix' | auiI18n)">
/
</span>
</div>
<button
aui-button="text"
(click)="clickNav(DateNavRange.Month)"
>
{{ headerRange?.start?.month() + 1 }}{{ 'month_suffix' | auiI18n }}
</a>
</button>
</span>

<span
*ngIf="dateNavRange === DateNavRange.Year"
[class]="bem.element('nav-content')"
>
<a
href="javascript:;"
<button
aui-button="text"
(click)="clickNav(DateNavRange.Year)"
>
{{ headerRange?.start?.year() }}{{ 'year_suffix' | auiI18n }}
</a>
</button>
</span>

<span
Expand Down
1 change: 1 addition & 0 deletions src/date-picker/calendar/panel/picker-panel.style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ $left-mask-shadow: -12px 0 0 0 use-rgb(popper-bg);
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
@include text-set(m);

width: 100%;
Expand Down

0 comments on commit 98c3372

Please sign in to comment.