Skip to content

Commit

Permalink
feat(calendar): support switch-mode props (#2056)
Browse files Browse the repository at this point in the history
* feat(calendar): support switch-mode props

* chore: lint

* feat(calendar): 高度调整为356px
  • Loading branch information
novlan1 authored Feb 8, 2025
1 parent 85edade commit b2e4e1d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 34 additions & 1 deletion style/mobile/components/calendar/v2/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,39 @@
color: @calendar-title-color;
}

&-header {
display: flex;
justify-content: space-between;
align-items: center;
line-height: 22px;
padding: 0 16px 8px;
box-sizing: border-box;
.border(bottom, @border-color);

&__title {
flex: 1;
text-align: center;
font-size: 14px;
font-weight: 600;
}

&__action {
display: flex;
font-size: 20px;
color: @calendar-switch-mode-icon-color;
}

&__icon {
padding: 8px;
cursor: pointer;
}

&__icon--disabled {
color: @calendar-switch-mode-icon-disabled-color;
cursor: not-allowed;
}
}

&__days {
display: grid;
grid-template-columns: repeat(7, 1fr);
Expand Down Expand Up @@ -67,7 +100,7 @@
padding: 16px 0 0;

&s {
height: 60vh;
height: 356px;
padding: 0 16px 16px;
box-sizing: border-box;

Expand Down
2 changes: 2 additions & 0 deletions style/mobile/components/calendar/v2/_var.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
@calendar-item-suffix-color: var(--td-calendar-item-suffix-color, @text-color-placeholder);
@calendar-item-centre-color: var(--td-calendar-item-centre-color, @brand-color-light);
@calendar-item-disabled-color: var(--td-calendar-item-disabled-color, @text-color-disabled);
@calendar-switch-mode-icon-color: var(--td-calendar-switch-mode-icon-color, @text-color-secondary);
@calendar-switch-mode-icon-disabled-color: var(--td-calendar-switch-mode-icon-disabled-color, @text-color-disabled);

0 comments on commit b2e4e1d

Please sign in to comment.