Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yew 0.18 support #36

Open
mistricky opened this issue Jun 29, 2021 · 3 comments
Open

Yew 0.18 support #36

mistricky opened this issue Jun 29, 2021 · 3 comments

Comments

@mistricky
Copy link

I can't use css-in-rust in Yew that version is 0.18

@MarcAntoine-Arnaud
Copy link

I have generate a PR #37
Waiting for approval ...
You can use the branch to start.

@ghost
Copy link

ghost commented Jul 30, 2021

you can make it manually

use yew::html::Classes;
use css_in_rust::Style;

pub fn parser(style: Style) -> Classes {
    Classes::from(style.to_string())
}

to use

let style = match Style::create(...){...};
html!{
    <Element class=parser(style.clone()) ></Element>
}

@tea-lover-418
Copy link

There is a fork of this repo that added 0.18 support: https://github.com/futursolo/stylist-rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants