Skip to content

Commit

Permalink
fixup! feat: change the datepicker styling to look more like the nati…
Browse files Browse the repository at this point in the history
…ve picker

Signed-off-by: greta <gretadoci@gmail.com>
  • Loading branch information
GretaD committed Sep 30, 2024
1 parent 00ba210 commit 78e44c4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
5 changes: 5 additions & 0 deletions src/components/NcDateTimePicker/chevron-double-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/components/NcDateTimePicker/chevron-double-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 14 additions & 13 deletions src/components/NcDateTimePicker/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@
&.in-range,
&.disabled {
border-radius: var(--border-radius-small);
background-color: var(--color-background-dark);
color: var(--color-main-text);
opacity: 1;
}
Expand Down Expand Up @@ -195,10 +194,9 @@
font-weight: bold;
}
&.disabled {
opacity: $opacity_disabled;
opacity: $opacity_full;
color: var(--color-main-text);
border-radius: var(--border-radius-small);
background-color: var(--color-background-darker);
}
}

Expand Down Expand Up @@ -269,7 +267,7 @@
min-width: $cell_height;
height: $cell_height;
margin: 0 2px !important; // center also single element. Definitively use margin so that buttons are not touching
padding: 7px 10px;
padding: 0;
cursor: pointer;
text-decoration: none;
opacity: $opacity_full;
Expand Down Expand Up @@ -301,7 +299,7 @@
cursor: pointer;
text-align: center;
text-decoration: none;
opacity: $opacity_normal;
opacity: $opacity_full;
color: var(--color-main-text);
border-radius: var(--border-radius-small);
background-color: transparent;
Expand All @@ -316,8 +314,10 @@
}

// Header arrows
&.mx-btn-icon-double-left,
&.mx-btn-icon-left,
&.mx-btn-icon-right {
&.mx-btn-icon-right,
&.mx-btn-icon-double-right {
align-items: center;
justify-content: center;
width: $cell_height;
Expand Down Expand Up @@ -345,22 +345,25 @@
display: flex;
color: var(--color-main-text);
}
.mx-btn-icon-double-left,
.mx-btn-icon-double-right {
display: none;
.mx-btn-icon-double-left > i {
background-image: url('./chevron-double-left.svg');
}

.mx-btn-icon-left > i {
background-image: url('./chevron-left.svg');
}

.mx-btn-icon-right > i {
background-image: url('./chevron-right.svg');
}

.mx-btn-icon-double-right > i {
background-image: url('./chevron-double-right.svg');
}
button.mx-btn-icon-right {
order: 2;
}
button.mx-btn-icon-double-right {
order: 3;
}
}
// Week panel
.mx-calendar-week-mode {
Expand Down Expand Up @@ -414,14 +417,12 @@
&.active,
&:hover {
color: var(--color-primary-element-text);
background-color: var(--color-primary-element);
}

&.disabled {
cursor: not-allowed;
opacity: $opacity_disabled;
color: var(--color-main-text);
background-color: var(--color-main-background);
}
}
}
Expand Down

0 comments on commit 78e44c4

Please sign in to comment.