Open Sandros94 opened 3 months ago
Not sure to understand, what would this function do? 🤔 The colors
object is defined differently for each component. Also, we can't import from #ui
at this point as it has not been built yet.
Not sure to understand, what would this function do? 🤔
Lets say I want to create a layer to further customize nuxt ui (or, if you want, nuxt ui pro as an example), and I would like to keep most of the same functionalities when adding new components (like having a default theme and being able to customize it via app.config
or :ui
prop). If that component has multiple colors (inherited by nuxt ui) then I would be forced to define each one in the static theme or create a local module with a template (much like you did here). Wouldn't it be possible to define a small utility function (defineTheme
) that would help with this? Or am I mismatching concepts?
The
colors
object is defined differently for each component.
Ah, you are right, because one could need a bg-${color}-500
but another text-${color}-500
.
Also, we can't import from
#ui
at this point as it has not been built yet.
You mean in the lifecycle of the module?
This issue is stale because it has been open for 30 days with no activity.
Description
Just out of curiosity, taking the accordion theme as an example, could a function like following
defineTheme
be possible?The idea is to both simplifying module/layer authors in creating new components, integrating things like
colors
(andsizes
if #52 works), as well solving #35 (if I understand HMR correctly).Additional context
No response