futursolo / stylist-rs

A CSS-in-Rust styling solution for WebAssembly Applications
https://crates.io/crates/stylist
MIT License
366 stars 22 forks source link

Error on yew 0.21.0 #143

Closed amiyatulu closed 9 months ago

amiyatulu commented 9 months ago

Importing stylesheet in styled_component


const STYLE_FILE: &str = include_str!("upload_video.css");
#[styled_component(UploadVideo)]  

html! {
        <div class="container">
            <div class={stylesheet}>

gives following error:

the trait bound `Classes: From<Style>` is not satisfied
the following other types implement trait `From<T>`:
  <Classes as From<Cow<'static, str>>>
  <Classes as From<implicit_clone::unsync::IString>>
  <Classes as From<Vec<T>>>
  <Classes as From<std::string::String>>
  <Classes as From<std::option::Option<T>>>
  <Classes as From<[T; SIZE]>>
  <Classes as From<&std::string::String>>
  <Classes as From<&implicit_clone::unsync::IString>>
and 3 others
required for `Style` to implement `Into<Classes>`rustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B3%5D?3#file%3A%2F%2F%2Fhome%2Famiya%2FDocuments%2Fworkspace%2Fshivarthu%2Fworking_directory%2Fshivarthu-client%2Fsrc%2Fcomponents%2Fipfs%2Fupload_video.rs)
futursolo commented 9 months ago

I have published Stylist v0.13.0, which is compatible with Yew v0.21.0.