svelte-plugins / datepicker

A simple datepicker component designed for Svelte.
https://svelte-plugins.github.io/datepicker
MIT License
54 stars 12 forks source link

๐Ÿš€ avoid loading rubik font when a theme is provided #8

Closed ThomasJuster closed 8 months ago

ThomasJuster commented 8 months ago

Intro words: Thanks for making this lib, very lean and customisable ๐Ÿ™

Why these changes? Because it felt unneeded to load a font when not used, which is likely to happen when providing your own theme. I guess it could be another prop includeFont for instance, but I'd rather not change the component API myself.

How do we test?

  1. I ran npm run build
  2. I ran npm run start
  3. In the docs/App.svelte, I commented every sections except the demo one and added/removed the <DatePicker theme="" /> property

Screenshots

When present, no font is loaded โœ… image

When absent, font is loaded โœ… image

dysfunc commented 8 months ago

Wow - I actually dropped that change on accident before the last release ๐Ÿคฆ๐Ÿป . I'll PR something right now.

dysfunc commented 8 months ago

https://github.com/svelte-plugins/datepicker/pull/9

ThomasJuster commented 8 months ago

Dat reactivity ๐Ÿคฏ Awesome, thanks ๐Ÿ™