Theme-aware static rendering#894
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/robinweser/fela/CHjxCn7JCvNHY2fzzXvagZYrqU6k |
|
@robinweser, this looks great and I think will allow plugins needing additional props to work. I think my original issue wasn't due to props-based plugins (e.g.
The above are usually supported in inlined style definitions when using Fela, but when using with Your solution does help me use a formal fix for Thanks, |
|
@chrisrzhou Yeah, this does not introduce nested behaviour to static rendering yet. That's a feature I want to provide with an enhancer in the future, but didn't have time yet to do. |
Description
Added a third argument
propstorenderer.renderStaticwhich are used when processing plugins.This is mostly used when processing styles with plugins like theme-value or responsive-value where we want the
themebeing present in our props.Additionally, I added a
staticStylefunction touseFelawhich passes the props including theme by default. This works exactly the same as the props passing incss.Example
If required, add a code example or a link to a working example (repository).
Packages
List all packages that have been changed.
Versioning
Minor
Checklist
Quality Assurance
pnpm run format)pnpm run lint)pnpm run test)Changes
If one of the following checks doesn't make sense due to the type of PR, just check them.