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

No MatButton in the root #11

Open
mistricky opened this issue Jun 27, 2021 · 8 comments
Open

No MatButton in the root #11

mistricky opened this issue Jun 27, 2021 · 8 comments
Labels
question Further information is requested

Comments

@mistricky
Copy link

I have add material-yew as dependencies in my Cargo.toml:

[dependencies]
yew = "0.18.0"
wasm-bindgen = "0.2.67"
material-yew = "0.1.0"
yew-router = "0.15.0"

And then I'm use the MatButton from material-yew in my rust file

use material_yew::MatButton;

but I get the following error

unresolved import `material_yew::MatButton`

no `MatButton` in the rootrustc(E0432)

Am I missing something?

@mistricky
Copy link
Author

I'm trying to pull material-yew by git repo way, that's working for me. but Idk why? when I define the version of material-yew directly, I can't use any component in my project.

@ranile
Copy link
Owner

ranile commented Jun 27, 2021

You have to enable the required feature.

I really should remove the feature locks as wasm bindgen just doesn't fetch what isn't used. Presumably because rustc just removes that code.

@ranile ranile added the question Further information is requested label Jun 27, 2021
@santokalayil
Copy link

how to do that?

You have to enable the required feature.

I really should remove the feature locks as wasm bindgen just doesn't fetch what isn't used. Presumably because rustc just removes that code.

@ranile
Copy link
Owner

ranile commented Feb 22, 2022

@santokalayil see cargo features

@santokalayil
Copy link

santokalayil commented Feb 23, 2022

@hamza1311 i know how to use cargo features. the question is which are options that are to be included

what is the relevant required feature to get rid of this error

@ranile
Copy link
Owner

ranile commented Feb 23, 2022

Enable the full feature

@santokalayil
Copy link

Enable the full feature

[features]
full = []

? how is it

@ranile
Copy link
Owner

ranile commented Feb 23, 2022

material-yew = { version = "0.1.0", features = ["full"] }

This is how you enable the feature

@nash1111 nash1111 mentioned this issue Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants