Allow consuming dev to provide custom values for theme #1312
Unanswered
cforsyth68
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have an NX monorepo with components in individually packaged React libraries. We would like to style each component library with VE. We offer several themes to choose from, but also want our end users to provide custom values or override specific vars.
The way we are going about it is to set up a theme with static identifiers so our clients can override the css names in their css.
Or perhaps we could make use of a context provider for them to pass a theme to and we somehow use that in our code at run time?
Anyone have any experience with this or suggestions.
Bottom line: the component library will offer a theme proveder that allows client devs to set props for brand and mode (dark|light). And also provide a theme to another prop of the provider that contains custom values in a custom theme for our library components put within that theme block.
Beta Was this translation helpful? Give feedback.
All reactions