Open techniq opened 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 |
---|---|
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 |
---|---|
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
classes
like Svelte UX to pass class to underlying componentscreateTheme()
support.ComponentName
classescolor
prop (userScale
andfill
/stroke
/class
/style
?var(--color-xxx-xxx)
. Default tofill-accent-500
when possible (or possiblyclass="[--color:theme(colors.blue.500)]"
const { format } = settings()
/$format
instead offormatNumber()
/formatDate()
directly