techniq / layerchart

Composable Svelte chart components to build a wide range of visualizations
https://www.layerchart.com
MIT License
641 stars 12 forks source link

Theme / styling with settings() #39

Open techniq opened 1 year ago

techniq commented 1 year ago
techniq commented 1 year ago

For reference, here is how it was implemented in Svelte UX. There might be some refinements since that PR, but I figure it helps to see the pieces that changed.

Also, it would be good if we could also either solve the sveld reading of types...

Source Docs
image image

or go into each component and add JSDocs (sadly we still need the types as the jsdoc comment wasn't being picked up during development for autocomplete/etc (although I could be overlooking something)

/** @type {{root?: string, icon?: string, loading?: string}} */
export let classes: {
    root?: string;
    icon?: string;
    loading?: string;
  } = {};
Source Docs
image image

I hate to double specify it, so really hoping that we can figure out the sveld issue (or find something that works).

This is also captured in https://github.com/techniq/svelte-ux/issues/53