dioxus-community / dioxus-free-icons

Use free svg icons in your Dioxus projects easily with dioxus-free-icons.
Other
79 stars 21 forks source link

feat: Dioxus 0.6 support #55

Open marc2332 opened 2 months ago

IroncladDev commented 1 month ago

Just tried this out with the 0.6.0-alpha.2 version of dioxus.

It doesn't compile because there's a comma separating two Elements

packages/lib/src/icon_component.rs

if let Some(title_text) = props.title {
  title {
    "{title_text}"
  }
}, // <-- comma needs to be removed
{props.icon.child_elements()}

packages/example/src/main.rs

h3 { "Frontend that scales." }
p { "Dioxus is a portable, performant, and ergonomic framework for building cross-platform user interfaces in Rust." }, // <-- comma needs to be removed
Icon {
  width: 60,
  height: 60,
  icon: FaRust,
}
marc2332 commented 1 month ago

Just tried this out with the 0.6.0-alpha.2 version of dioxus.

It doesn't compile because there's a comma separating two Elements

packages/lib/src/icon_component.rs

if let Some(title_text) = props.title {
  title {
    "{title_text}"
  }
}, // <-- comma needs to be removed
{props.icon.child_elements()}

packages/example/src/main.rs

h3 { "Frontend that scales." }
p { "Dioxus is a portable, performant, and ergonomic framework for building cross-platform user interfaces in Rust." }, // <-- comma needs to be removed
Icon {
  width: 60,
  height: 60,
  icon: FaRust,
}

damn it!

marc2332 commented 1 month ago

Try now @IroncladDev (I haven't tested it myself)