DioxusLabs / DioxusLabs/dioxus
Multiple class tags on component fails to compile
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
**Problem**
Using multiple class tags on a component in RSX does not work.
**Steps To Reproduce**
Steps to reproduce the behavior:
```rust
#[component]
pub fn ExampleComponent() -> Element {
rsx! {
div {
id: "example-component",
div {
class: "text-2xl",
class: "border-white", // Works as expected
"test"
}
Link {
class: "flex items-center border-b",
class: "border-white", // Won't compile
to: Route::ToSomeRoute {},
"Link"
}
}
}
}
```
**Expected behavior**
I expect that both html tags and components can be styled with multiple class tags for conditional styling with something like TailwindCSS
**Screenshots**
N/A
**Environment:**
- Dioxus version: 0.7.2
- Rust version: 1.91.1
- OS info: Windows
- App platform: web
**Questionnaire**
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.