Dynamically change wrapper based on tag used
See original GitHub issueRaised from https://github.com/styled-components/vscode-styled-components/issues/293 Feature in Styled Components: https://styled-components.com/docs/basics#animations
Hey @mjbvz do you know if its possible to dynamically change the root based on the tag used?
In this case we want the keyframes`` tag to use a @keyframes {
root instead of the traditional :root {
version.
Seeing as there’s no way of knowing which tag was used to trigger intellisense the only other option is to heuristically check the contents to know what wrapper to use. If there’s percentage as the first token or from/to switch to @keyframes {
wrapper
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Dynamically changing wrapper tag in React - Stack Overflow
I was wondering if there is a way to dynamically change just the wrapper tag in same line without repeating the code for...
Read more >Dynamic Wrapper Setup - IDX Broker - Support
In the IDX control panel navigate to Design -> Website -> Wrappers. Choose which wrapper you would like to edit (Global, Categories, Pages,...
Read more >How to adding dynamic rows/fields to wrapper class?
How can I dynamically update this wrapper class object. In below code i have used only two fields (id, name), but in future...
Read more >How to conditionally wrap an element in React - Hackages Blog
To render a different wrapping element based on a condition, we can use this one line functional component and determine in our component...
Read more >Dynamic Tag Name Props in React (with TypeScript)
@equinusocio Yeah, unfortunately, that won't work as far as I can tell. You'll need to use a slot or render prop if the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
There’s now a PR for this issue, with support for
keyframes
Some good news, it seems i can get hold of the tag via
context.node.parent.tag.escapedText