Replies: 3 comments 5 replies
-
I'd encourage you to think of each of the children in I'm not sure the exact details of what you're trying to do, but the use case you're suggesting (adding a CSS class to every child element) is pretty easily accomplished in CSS itself without adding that child class to every element (with a |
Beta Was this translation helpful? Give feedback.
-
You may want to take a look at the If you do want to do it yourself, then view! { cx, class = "something",
<div><p><span>"Content"</span></p></div>
} will apply the class |
Beta Was this translation helpful? Give feedback.
-
So that stylers library didnt work for me but thanks to your help I managed to achieve what I wanted. I also want to publish the component to crates.io so that other people can use it if they want. Im having trouble setting it up so that I can import the component though. Is there anything I can read to figure this out? This is what I got so far Im pretty sure it has something to do with the
it works just fine, but when I want to upload it to crates.io, it's saying I need a specific version |
Beta Was this translation helpful? Give feedback.
-
I saw in the codebase an example that referenced children like this
What id like to do is access each child and set attributes on them such that I can create a wrapper component and modify children without explicitly doing it for every html tag in every component.
I see that there exist properties that ostensibly would allow me to do this but it looks like theyre private.
Any idea how I could, say, explicitly add a class name to each child html element?
Beta Was this translation helpful? Give feedback.
All reactions