diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..59b5a86 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,31 @@ +name: Yew Styles + +on: + pull_request: + branches: [ master, development ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: wasm-pack + uses: jetli/wasm-pack-action@v0.3.0 + with: + version: 'latest' + - name: install rustfmt + run: rustup component add rustfmt + - name: install clippy + run: rustup component add clippy + - name: install stable + run: rustup install stable + - name: add wasm32-unknown-unknown + run: rustup target add wasm32-unknown-unknown + - name: download geckodriver + run: curl --retry 5 -LO https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz + - name: uncompress geckodriver + run: tar -xzf geckodriver-v0.26.0-linux64.tar.gz + - name: execute CI + run: GECKODRIVER=$(pwd)/geckodriver ./ci/run_checks.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1adf70f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -branches: - only: - - development - - master - -language: rust -sudo: false -addons: - firefox: latest - -cache: cargo - -before_cache: - - ./ci/clear_cache.sh - -rust: - - 1.43.0 - - stable - -matrix: - fast_finish: true - -install: - - rustup component add rustfmt - - rustup component add clippy - - rustup install stable - - rustup target add wasm32-unknown-unknown - - curl --retry 5 -LO https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz - - tar -xzf geckodriver-v0.26.0-linux64.tar.gz - -script: - - GECKODRIVER=$(pwd)/geckodriver ./ci/run_checks.sh \ No newline at end of file diff --git a/README.md b/README.md index 5adbd3e..1373cc9 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,14 @@ however, it is not necessary to worry about the sass module only it needs to be import 'node_modules/yew-styles/main.css'; ``` 4. Ready to import and use in your project 🚀 -In the left side there is a list of links where each one access to a correspondent component documentation, -there, shows how to use it. ## Run the documentation page -Inside of the project run: +1. `git clone https://github.com/spielrs/yew_styles.git` +2. `cd yew_styles` +3. `npm start` -`npm start` +In the left side there is a list of links where each one access to a correspondent component documentation, +there, shows how to use it. ## Run the tests Inside of the project run: @@ -34,4 +35,8 @@ Inside of the project run: ## Development phase Yew style is in early phase, currently doesn't have enough components to cover all the requirements that could need a website/web application. -All contributions are appreciated. \ No newline at end of file +All contributions are appreciated. + +## License + +Yew Style is MIT licensed. See [license](LICENSE) \ No newline at end of file diff --git a/app/page-styles/_app.sass b/app/page-styles/_app.sass index 7b0eb6b..643ee32 100644 --- a/app/page-styles/_app.sass +++ b/app/page-styles/_app.sass @@ -8,4 +8,7 @@ &:hover background-color: rgb(230, 236, 241) - \ No newline at end of file +.container + .item + code + font-size: 1vw \ No newline at end of file diff --git a/ci/clear_cache.sh b/ci/clear_cache.sh deleted file mode 100755 index 4135c71..0000000 --- a/ci/clear_cache.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -set -x - -# inspired by https://github.com/rust-analyzer/rust-analyzer/blob/master/.travis.yml -find ./crate/yew_styles/target/debug -maxdepth 1 -type f -delete -find ./crate/yew_styles/target/tests/target/debug -maxdepth 1 -type f -delete -find ./crate/yew_styles/target/asmjs-unknown-emscripten/debug -maxdepth 1 -type f -delete -find ./crate/yew_styles/target/wasm32-unknown-emscripten/debug -maxdepth 1 -type f -delete -find ./crate/yew_styles/target/wasm32-unknown-unknown/debug -maxdepth 1 -type f -delete -rm -fr ./crate/yew_styles/target/debug/{deps,.fingerprint}/{*yew*,*\.was,*\.js*,*test*} -rm -fr ./crate/yew_styles/target/tests/target/debug/{deps,.fingerprint}/{*yew*,*\.was,*\.js*,*test*} -rm -fr ./crate/yew_styles/target/asmjs-unknown-emscripten/debug/{deps,.fingerprint}/{*yew*,*\.was,*\.js*,*test*} -rm -fr ./crate/yew_styles/target/wasm32-unknown-emscripten/debug/{deps,.fingerprint}/{*yew*,*\.was*,*\.js*,*test*} -rm -fr ./crate/yew_styles/target/wasm32-unknown-unknown/debug/{deps,.fingerprint}/{*yew*,*\.was*,*\.js*,*test*} -rm -fr ./crate/yew_styles/target/debug/incremental -rm -fr ./crate/yew_styles/target/tests/target/debug/incremental -rm -fr ./crate/yew_styles/target/asmjs-unknown-emscripten/debug/incremental -rm -fr ./crate/yew_styles/target/wasm32-unknown-emscripten/debug/incremental -rm -fr ./crate/yew_styles/target/wasm32-unknown-unknown/debug/incremental -rm -f ./crate/yew_styles/target/.rustc_info.json -rm -f ./crate/yew_styles/target/tests/target/.rustc_info.json -rm -fr ./crate/yew_styles/target/wasm32-unknown-unknown/wbg-tmp -rm -fr /home/travis/.cargo/registry/index/github.com-* \ No newline at end of file diff --git a/ci/run_checks.sh b/ci/run_checks.sh index 414a7d9..dab724c 100755 --- a/ci/run_checks.sh +++ b/ci/run_checks.sh @@ -4,4 +4,4 @@ set -euxo pipefail cargo fmt --manifest-path=crate/yew_styles/Cargo.toml --all -- --check cargo clippy --manifest-path=crate/yew_styles/Cargo.toml --all -- --deny=warnings -cargo test --target wasm32-unknown-unknown --manifest-path=crate/yew_styles/Cargo.toml +wasm-pack test --headless --firefox crate/yew_styles diff --git a/crate/.cargo/config b/crate/.cargo/config index 91cd80c..042e360 100644 --- a/crate/.cargo/config +++ b/crate/.cargo/config @@ -1,2 +1,2 @@ [build] -target="wasm32-unknown-unknown" \ No newline at end of file +target="wasm32-unknown-unknown" diff --git a/crate/Cargo.lock b/crate/Cargo.lock index d975e70..497a597 100644 --- a/crate/Cargo.lock +++ b/crate/Cargo.lock @@ -692,7 +692,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "wasm-bindgen-test" -version = "0.3.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -700,12 +700,12 @@ dependencies = [ "scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-futures 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-test-macro 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-test-macro 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -761,7 +761,7 @@ dependencies = [ [[package]] name = "yew" -version = "0.14.3" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "anyhow 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", @@ -790,12 +790,12 @@ dependencies = [ "wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-futures 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "web-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)", - "yew-macro 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", + "yew-macro 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "yew-macro" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "boolinator 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -808,7 +808,7 @@ dependencies = [ [[package]] name = "yew-router" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -821,25 +821,25 @@ dependencies = [ "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "web-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)", - "yew 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)", - "yew-router-macro 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "yew-router-route-parser 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "yew 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "yew-router-macro 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "yew-router-route-parser 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "yew-router-macro" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "yew-router-route-parser 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "yew-router-route-parser 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "yew-router-route-parser" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "nom 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -847,12 +847,13 @@ dependencies = [ [[package]] name = "yew_prism" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-test 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "web-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)", - "yew 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)", + "yew 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -868,9 +869,9 @@ dependencies = [ "wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "web-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)", "wee_alloc 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "yew 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)", - "yew-router 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "yew_prism 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "yew 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "yew-router 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", + "yew_prism 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "yew_styles 0.3.0", ] @@ -881,9 +882,9 @@ dependencies = [ "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-test 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-test 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "web-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)", - "yew 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)", + "yew 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] @@ -976,17 +977,17 @@ dependencies = [ "checksum wasm-bindgen-macro 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "8bd151b63e1ea881bb742cd20e1d6127cef28399558f3b5d415289bc41eee3a4" "checksum wasm-bindgen-macro-support 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "d68a5b36eef1be7868f668632863292e37739656a80fc4b9acec7b0bd35a4931" "checksum wasm-bindgen-shared 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "daf76fe7d25ac79748a37538b7daeed1c7a6867c92d3245c12c6222e4a20d639" -"checksum wasm-bindgen-test 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "449aeba7035e4a4710cd263bbac33519fa3828bff1c6f642fa8896601e7016ad" -"checksum wasm-bindgen-test-macro 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "49449f8dcedc192bd0cf11b5711982decdd4dbad1029f92370e2b1215031dd59" +"checksum wasm-bindgen-test 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "98fd0ec352c44d1726b6c2bec524612b1c81e34a7d858f597a6c71f8e018c82e" +"checksum wasm-bindgen-test-macro 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "97837a6e83ab24a4b3a38d44a257e13335b54f4b4548b2c9d71edd0bf570cb4f" "checksum web-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)" = "721c6263e2c66fd44501cc5efbfa2b7dfa775d13e4ea38c46299646ed1f9c70a" "checksum wee_alloc 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d" -"checksum yew 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e48bc6b264e30362e5d420cd6aa2cd24dd4c9131284bc24afc0a41c28c125f3" -"checksum yew-macro 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "074c652331c32cf6431b0c5c4b6cb6fbb2168a1be6022e51b32c95fefb70153c" -"checksum yew-router 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "19145953cfaa35cbd26a06ef5f589553d8e16d2a8d889d9c3e74516617ea7db8" -"checksum yew-router-macro 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5e2b24468a3ea4ac70f2c46f6ca07a80b2cbb14eb725a16bc74eb5d759fbb3e7" -"checksum yew-router-route-parser 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e6801d6eb8583313fb33f20b141627c51881d24225e8de1660571e971f268d8" -"checksum yew_prism 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd106672abd15d82f60486abaafcde1491c33ee5f3fcd138cb7429edf449850e" +"checksum yew 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7532a83ec6c2173cd72888bb3ac0e3656d0dd152476f71631f4b465481855391" +"checksum yew-macro 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28cf0535e956932124a66721a0f91a1f65a1654ab509c43c3b5d71eb10f20089" +"checksum yew-router 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "30c14c320554af8f6c9412606daca46e9fdac686b6be6f3563e7f4073c628f8e" +"checksum yew-router-macro 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "88820ce667e8b1b17750c2294e69dc93932bdcfd76a7fec5b7b573131f3421c1" +"checksum yew-router-route-parser 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c4708315d2325182b9c3d8c9805e4f5293baf6e6103f9cd4f989ddedca192a" +"checksum yew_prism 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "18729acde7cdb3dea9acb4ef2e3610035f69c2795d0172f8def81718a85199de" diff --git a/crate/Cargo.toml b/crate/Cargo.toml index 7ee6e6e..afd438e 100644 --- a/crate/Cargo.toml +++ b/crate/Cargo.toml @@ -2,7 +2,7 @@ authors = ["The RustWasm Developers"] categories = ["wasm"] description = "My awesome Yew with Yew-Router and Parcel application!" -license = "Apache-2.0/MIT" +license = "MIT" name = "yew_style_page" readme = "./README.md" repository = "https://github.com/spielrs/yew-styles-page.git" @@ -20,8 +20,8 @@ serde = "1.0" serde_derive = "1.0" dotenv = "0.15" failure = "0.1" -yew = { version="0.14", features = ["toml", "yaml", "msgpack", "cbor", "web_sys"]} -yew-router = {version = "0.11", features = ["web_sys"] } +yew = { version="0.15", features = ["toml", "yaml", "msgpack", "cbor", "web_sys"]} +yew-router = {version="0.12", features = ["web_sys"] } web-sys = "0.3" -yew_prism = "0.1" +yew_prism = {version="0.2"} yew_styles= {path= "./yew_styles"} diff --git a/crate/src/app.rs b/crate/src/app.rs index f22ee48..0cb1318 100644 --- a/crate/src/app.rs +++ b/crate/src/app.rs @@ -31,7 +31,11 @@ impl Component for App { } fn update(&mut self, _: Self::Message) -> ShouldRender { - true + false + } + + fn change(&mut self, _props: Self::Properties) -> ShouldRender { + false } fn view(&self) -> Html { diff --git a/crate/src/page/button_page.rs b/crate/src/page/button_page.rs index f8a3f57..2fc1143 100644 --- a/crate/src/page/button_page.rs +++ b/crate/src/page/button_page.rs @@ -39,6 +39,10 @@ impl Component for ButtonPage { true } + fn change(&mut self, _props: Self::Properties) -> ShouldRender { + false + } + fn view(&self) -> Html { html! { <> diff --git a/crate/src/page/home_page.rs b/crate/src/page/home_page.rs index 76ece95..d7e7eeb 100644 --- a/crate/src/page/home_page.rs +++ b/crate/src/page/home_page.rs @@ -18,6 +18,10 @@ impl Component for HomePage { false } + fn change(&mut self, _props: Self::Properties) -> ShouldRender { + false + } + fn view(&self) -> Html { html! { ShouldRender { - true + false + } + + fn change(&mut self, _props: Self::Properties) -> ShouldRender { + false } fn view(&self) -> Html { diff --git a/crate/src/page/navbar_page.rs b/crate/src/page/navbar_page.rs index 517f5bd..f942589 100644 --- a/crate/src/page/navbar_page.rs +++ b/crate/src/page/navbar_page.rs @@ -53,6 +53,10 @@ impl Component for NavbarPage { } } + fn change(&mut self, _props: Self::Properties) -> ShouldRender { + false + } + fn update(&mut self, msg: Self::Message) -> ShouldRender { match msg { Msg::ChangeType(index, navbar_menu) => { diff --git a/crate/yew_styles/Cargo.lock b/crate/yew_styles/Cargo.lock index 1dca82f..c8b0c70 100644 --- a/crate/yew_styles/Cargo.lock +++ b/crate/yew_styles/Cargo.lock @@ -589,7 +589,7 @@ dependencies = [ [[package]] name = "yew" -version = "0.14.3" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "anyhow 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -618,12 +618,12 @@ dependencies = [ "wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-futures 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "web-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)", - "yew-macro 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", + "yew-macro 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "yew-macro" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "boolinator 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -643,7 +643,7 @@ dependencies = [ "wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-test 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", "web-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)", - "yew 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)", + "yew 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] @@ -722,5 +722,5 @@ dependencies = [ "checksum wasm-bindgen-test-macro 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)" = "cf2f86cd78a2aa7b1fb4bb6ed854eccb7f9263089c79542dca1576a1518a8467" "checksum web-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)" = "2d6f51648d8c56c366144378a33290049eafdd784071077f6fe37dae64c1c4cb" "checksum yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d" -"checksum yew 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e48bc6b264e30362e5d420cd6aa2cd24dd4c9131284bc24afc0a41c28c125f3" -"checksum yew-macro 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "074c652331c32cf6431b0c5c4b6cb6fbb2168a1be6022e51b32c95fefb70153c" +"checksum yew 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7532a83ec6c2173cd72888bb3ac0e3656d0dd152476f71631f4b465481855391" +"checksum yew-macro 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28cf0535e956932124a66721a0f91a1f65a1654ab509c43c3b5d71eb10f20089" diff --git a/crate/yew_styles/Cargo.toml b/crate/yew_styles/Cargo.toml index 33b5c7c..488c432 100644 --- a/crate/yew_styles/Cargo.toml +++ b/crate/yew_styles/Cargo.toml @@ -7,6 +7,7 @@ authors = ["Francisco Jesus Navarro Cortes "] edition = "2018" license = "MIT" repository = "https://github.com/spielrs/yew-styles-page/tree/master/crate/yew_styles" +readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -15,7 +16,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] wasm-bindgen = "0.2.60" -yew = { version="0.14", features = ["toml", "yaml", "msgpack", "cbor", "web_sys"] } +yew = { version="0.15", features = ["toml", "yaml", "msgpack", "cbor", "web_sys"] } web-sys = {version = "0.3.36", features = ["HtmlDocument", "HtmlCollection", "CssStyleDeclaration", "HtmlElement", "Node"]} rand = {version="0.7", features = ["getrandom"]} getrandom = {version = "0.1", features= ["wasm-bindgen"]} diff --git a/crate/yew_styles/README.md b/crate/yew_styles/README.md index 1590cae..f52007b 100644 --- a/crate/yew_styles/README.md +++ b/crate/yew_styles/README.md @@ -20,8 +20,6 @@ however, it is not necessary to worry about the sass module only it needs to be import 'node_modules/yew-styles/main.css'; ``` 4. Ready to import and use in your project 🚀 -In the left side there is a list of links where each one access to a correspondent component documentation, -there, shows how to use it. ## Development phase Yew style is in early phase, currently doesn't have enough components to cover all the requirements that could need a website/web application. diff --git a/crate/yew_styles/src/assets.rs b/crate/yew_styles/src/assets.rs index e6bf85a..9829e3c 100644 --- a/crate/yew_styles/src/assets.rs +++ b/crate/yew_styles/src/assets.rs @@ -30,6 +30,10 @@ impl Component for Assets { false } + fn change(&mut self, _props: Self::Properties) -> ShouldRender { + false + } + fn view(&self) -> Html { get_icon(self.props.asset.clone(), self.props.class_name.clone()) } diff --git a/crate/yew_styles/src/components/button.rs b/crate/yew_styles/src/components/button.rs index 37ce2f5..6e75030 100644 --- a/crate/yew_styles/src/components/button.rs +++ b/crate/yew_styles/src/components/button.rs @@ -53,6 +53,10 @@ pub enum Size { /// false /// } /// +/// fn change(&mut self, _props: Self::Properties) -> ShouldRender { +/// false +/// } +/// /// fn view(&self) -> Html { /// html! { ///