6eDesign / svelte-calendar

A lightweight datepicker with neat animations and a unique UX.
https://6edesign.github.io/svelte-calendar/
MIT License
537 stars 89 forks source link

Style of the open calendar button #147

Open BartokIT opened 2 years ago

BartokIT commented 2 years ago

Hi, thanks for this awesome component.

I'm trying to stylize the button to open the calendar without success: the theme support you added change only the calendar itself or it is possible to pass a custom button definition as slot to open the calendar?

KR

6eDesign commented 2 years ago

The theming can be used to style the background and text color of the default button/trigger for opening the calendar (it shares these css variables with the calendar). I could potentially add additional theming variables/capabilities for the button and document this better in the theme editor.

However it is also possible to pass your own button/trigger as a slot. There is an example of this on the github-pages documentation site ("custom trigger") but it basically looks like this: https://svelte.dev/repl/a7a20f473ed449aa82a37c280016cc18?version=3.44.3