ranile / material-yew

Yew wrapper for Material Web Components
https://material-yew.rm.rs
Apache License 2.0
230 stars 35 forks source link

No `MatButton` in the root #11

Open mistricky opened 3 years ago

mistricky commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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.

santokalayil commented 2 years ago

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 commented 2 years ago

@santokalayil see cargo features

santokalayil commented 2 years ago

@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 commented 2 years ago

Enable the full feature

santokalayil commented 2 years ago

Enable the full feature

[features] full = []

? how is it

ranile commented 2 years ago
material-yew = { version = "0.1.0", features = ["full"] }

This is how you enable the feature