Skip to content

Commit d9313b2

Browse files
authored
Merge pull request #16 from svelte-plugins/bugs
🐛 refactor(misc): updates to fix issues with theming, button props and timepicker
2 parents 58730d0 + 73a023b commit d9313b2

File tree

4 files changed

+1046
-730
lines changed

4 files changed

+1046
-730
lines changed

docs/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/src/examples/theme/theme.svelte

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import { format } from 'date-fns';
44
import Prism from 'svelte-prismjs';
55
6-
export let isMultipane = false;
7-
export let showPresets = false;
6+
export let isMultipane = true;
7+
export let showPresets = true;
88
99
export let days = 29;
1010
@@ -95,7 +95,7 @@
9595
</script>
9696
9797
<div class="date-filter">
98-
<DatePicker bind:isOpen bind:startDate isRange${isMultipane ? ' isMultipane' : ''}${showPresets ? ' showPresets' : ''}>
98+
<DatePicker theme="custom-datepicker" bind:isOpen bind:startDate isRange${isMultipane ? ' isMultipane' : ''}${showPresets ? ' showPresets' : ''}>
9999
<div class="date-field" on:click={toggleDatePicker} class:open={isOpen}>
100100
<i class="icon-calendar" />
101101
<div class="date">
@@ -135,6 +135,32 @@
135135
height: 14px;
136136
width: 14px;
137137
}
138+
139+
:global(.datepicker[data-picker-theme="custom-datepicker"]) {
140+
--datepicker-container-background: #ff66ae;
141+
--datepicker-container-border: 1px solid #ff1683;
142+
143+
--datepicker-calendar-header-text-color: #fff;
144+
--datepicker-calendar-dow-color: #fff;
145+
--datepicker-calendar-day-color: #fff;
146+
--datepicker-calendar-day-color-disabled: pink;
147+
--datepicker-calendar-range-selected-background: #ff1683;
148+
149+
--datepicker-calendar-header-month-nav-background-hover: #ff1683;
150+
--datepicker-calendar-header-month-nav-icon-next-filter: invert(100);
151+
--datepicker-calendar-header-month-nav-icon-prev-filter: invert(100);
152+
--datepicker-calendar-header-year-nav-icon-next-filter: invert(100);
153+
--datepicker-calendar-header-year-nav-icon-prev-filter: invert(100);
154+
155+
--datepicker-calendar-split-border: 1px solid pink;
156+
157+
--datepicker-presets-border: 1px solid pink;
158+
--datepicker-presets-button-background-active: #ff1683;
159+
--datepicker-presets-button-color: #fff;
160+
--datepicker-presets-button-color-active: #fff;
161+
--datepicker-presets-button-color-hover: #333;
162+
--datepicker-presets-button-color-focus: #333;
163+
}
138164
</style>
139165
`} />
140166

@@ -161,16 +187,28 @@
161187
}
162188
163189
:global(.datepicker[data-picker-theme="custom-datepicker"]) {
164-
--datepicker-state-active: pink;
165-
--datepicker-container-background: #FF66AE;
190+
--datepicker-container-background: #ff66ae;
191+
--datepicker-container-border: 1px solid #ff1683;
192+
166193
--datepicker-calendar-header-text-color: #fff;
167194
--datepicker-calendar-dow-color: #fff;
168195
--datepicker-calendar-day-color: #fff;
169196
--datepicker-calendar-day-color-disabled: pink;
170197
--datepicker-calendar-range-selected-background: #ff1683;
198+
199+
--datepicker-calendar-header-month-nav-background-hover: #ff1683;
171200
--datepicker-calendar-header-month-nav-icon-next-filter: invert(100);
172201
--datepicker-calendar-header-month-nav-icon-prev-filter: invert(100);
173202
--datepicker-calendar-header-year-nav-icon-next-filter: invert(100);
174203
--datepicker-calendar-header-year-nav-icon-prev-filter: invert(100);
204+
205+
--datepicker-calendar-split-border: 1px solid pink;
206+
207+
--datepicker-presets-border: 1px solid pink;
208+
--datepicker-presets-button-background-active: #ff1683;
209+
--datepicker-presets-button-color: #fff;
210+
--datepicker-presets-button-color-active: #fff;
211+
--datepicker-presets-button-color-hover: #333;
212+
--datepicker-presets-button-color-focus: #333
175213
}
176214
</style>

0 commit comments

Comments
 (0)