diff --git a/README.md b/README.md
index 1373cc9..848aa8c 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ Each component is splited in two parts, the logical yew component and its sass m
however, it is not necessary to worry about the sass module only it needs to be include in the project
### How install it
1. Install the sass module: `npm install yew-styles`
-2. Add the yew_style crate in Cargo.toml file: `yew_styles = "0.3.0"`
+2. Add the yew_style crate in Cargo.toml file: `yew_styles = "0.3.1"`
3. Import the main.css file in you main javascript/typescript file project:
```typescript
import 'node_modules/yew-styles/main.css';
diff --git a/app/index.ts b/app/index.ts
index 5cc719b..01c2b8e 100644
--- a/app/index.ts
+++ b/app/index.ts
@@ -1,7 +1,5 @@
import './yew-styles/main.sass';
import './page-styles/main.sass';
+import 'prismjs';
import 'prismjs/themes/prism.css';
import 'prismjs/components/prism-rust';
-
-import module from '../crate/Cargo.toml';
-module.run();
diff --git a/crate/Cargo.lock b/crate/Cargo.lock
index 497a597..f6dc717 100644
--- a/crate/Cargo.lock
+++ b/crate/Cargo.lock
@@ -761,7 +761,7 @@ dependencies = [
[[package]]
name = "yew"
-version = "0.15.0"
+version = "0.16.2"
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.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "yew-macro 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "yew-macro"
-version = "0.15.0"
+version = "0.16.1"
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.12.1"
+version = "0.13.0"
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.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)",
+ "yew 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "yew-router-macro 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "yew-router-route-parser 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "yew-router-macro"
-version = "0.12.0"
+version = "0.13.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.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "yew-router-route-parser 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "yew-router-route-parser"
-version = "0.12.0"
+version = "0.13.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,18 +847,17 @@ dependencies = [
[[package]]
name = "yew_prism"
-version = "0.2.1"
+version = "0.3.0"
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.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "yew 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "yew_style_page"
-version = "0.3.0"
+version = "0.3.1"
dependencies = [
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -869,22 +868,22 @@ 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.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",
+ "yew 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "yew-router 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "yew_prism 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "yew_styles 0.3.1",
]
[[package]]
name = "yew_styles"
-version = "0.3.0"
+version = "0.3.1"
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.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.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "yew 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[metadata]
@@ -985,9 +984,9 @@ dependencies = [
"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.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"
+"checksum yew 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fc1e1b60b090bf29758c6c42da2d2d6d54aa97dc73e3ccd1cd99d664b4c754cf"
+"checksum yew-macro 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f1d2fe46d7922ecd99af4e5b4eddcab58c70ec741e31de6e1b910d5873a3095f"
+"checksum yew-router 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c2d29986e07f8aab66507dd659f826062fb5ca434387cc44d4574a116ac52712"
+"checksum yew-router-macro 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2a8b72c6e6b40c5180e5b0fff9f5a9e67937f662c595cad87301fc480e50e347"
+"checksum yew-router-route-parser 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9662dbe5f703fa5458cba3a7a000faf232dc124214f9c33e06d05d50805fd9ca"
+"checksum yew_prism 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aefe5d5eadbcbbbbb1dce3eaf80549f0aced3285107e8ec56804f5eec160a6c5"
diff --git a/crate/Cargo.toml b/crate/Cargo.toml
index afd438e..bf81dbb 100644
--- a/crate/Cargo.toml
+++ b/crate/Cargo.toml
@@ -1,12 +1,12 @@
[package]
-authors = ["The RustWasm Developers"]
+authors = ["Francisco Jesus Navarro Cortes"]
categories = ["wasm"]
description = "My awesome Yew with Yew-Router and Parcel application!"
license = "MIT"
name = "yew_style_page"
readme = "./README.md"
repository = "https://github.com/spielrs/yew-styles-page.git"
-version = "0.3.0"
+version = "0.3.1"
[lib]
crate-type = ["cdylib"]
@@ -20,8 +20,8 @@ serde = "1.0"
serde_derive = "1.0"
dotenv = "0.15"
failure = "0.1"
-yew = { version="0.15", features = ["toml", "yaml", "msgpack", "cbor", "web_sys"]}
-yew-router = {version="0.12", features = ["web_sys"] }
+yew = { version="0.16", features = ["toml", "yaml", "msgpack", "cbor", "web_sys"]}
+yew-router = {version="0.13", features = ["web_sys"] }
web-sys = "0.3"
-yew_prism = {version="0.2"}
+yew_prism = {version="0.3"}
yew_styles= {path= "./yew_styles"}
diff --git a/crate/assets/spielrs_logo.png b/crate/assets/spielrs_logo.png
new file mode 100644
index 0000000..c097952
Binary files /dev/null and b/crate/assets/spielrs_logo.png differ
diff --git a/crate/src/page/navbar_page.rs b/crate/src/page/navbar_page.rs
index f942589..0ea58ae 100644
--- a/crate/src/page/navbar_page.rs
+++ b/crate/src/page/navbar_page.rs
@@ -194,7 +194,7 @@ fn get_navbar_type(
fixed=Fixed::None
navbar_style=style.style.clone()
navbar_type=navbar_type.navbar_type
- branch=html!{}
+ branch=html!{}
>
{get_menus(link.clone(), navbar_type_rendered)}
diff --git a/crate/yew_styles/.gitignore b/crate/yew_styles/.gitignore
new file mode 100644
index 0000000..1de5659
--- /dev/null
+++ b/crate/yew_styles/.gitignore
@@ -0,0 +1 @@
+target
\ No newline at end of file
diff --git a/crate/yew_styles/Cargo.lock b/crate/yew_styles/Cargo.lock
index c8b0c70..e8ebb50 100644
--- a/crate/yew_styles/Cargo.lock
+++ b/crate/yew_styles/Cargo.lock
@@ -60,7 +60,7 @@ version = "0.1.6"
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)",
- "wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wasm-bindgen 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -163,7 +163,7 @@ dependencies = [
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
"wasi 0.9.0+wasi-snapshot-preview1 (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 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -190,7 +190,7 @@ name = "gloo-events"
version = "0.1.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 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
"web-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -201,7 +201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gloo-events 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"js-sys 0.3.37 (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 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
"web-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -211,7 +211,7 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"js-sys 0.3.37 (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 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
"web-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -248,7 +248,7 @@ name = "js-sys"
version = "0.3.37"
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 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -490,16 +490,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "wasm-bindgen"
-version = "0.2.60"
+version = "0.2.62"
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)",
- "wasm-bindgen-macro 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wasm-bindgen-macro 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.60"
+version = "0.2.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bumpalo 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -508,7 +508,7 @@ dependencies = [
"proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
- "wasm-bindgen-shared 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wasm-bindgen-shared 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -518,34 +518,34 @@ 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)",
"js-sys 0.3.37 (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 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
"web-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.60"
+version = "0.2.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "wasm-bindgen-macro-support 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wasm-bindgen-macro-support 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.60"
+version = "0.2.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
- "wasm-bindgen-backend 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
- "wasm-bindgen-shared 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wasm-bindgen-backend 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wasm-bindgen-shared 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.60"
+version = "0.2.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -556,7 +556,7 @@ dependencies = [
"console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"js-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)",
"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 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen-futures 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen-test-macro 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -576,7 +576,7 @@ version = "0.3.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"js-sys 0.3.37 (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 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -589,7 +589,7 @@ dependencies = [
[[package]]
name = "yew"
-version = "0.15.0"
+version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"anyhow 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -615,15 +615,15 @@ dependencies = [
"slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"thiserror 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.5.6 (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 0.2.62 (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.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "yew-macro 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "yew-macro"
-version = "0.15.0"
+version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"boolinator 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -636,14 +636,14 @@ dependencies = [
[[package]]
name = "yew_styles"
-version = "0.3.0"
+version = "0.3.1"
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 0.2.62 (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.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "yew 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[metadata]
@@ -712,15 +712,15 @@ dependencies = [
"checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a"
"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
-"checksum wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "2cc57ce05287f8376e998cbddfb4c8cb43b84a7ec55cf4551d7c00eef317a47f"
-"checksum wasm-bindgen-backend 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "d967d37bf6c16cca2973ca3af071d0a2523392e4a594548155d89a678f4237cd"
+"checksum wasm-bindgen 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "e3c7d40d09cdbf0f4895ae58cf57d92e1e57a9dd8ed2e8390514b54a47cc5551"
+"checksum wasm-bindgen-backend 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "c3972e137ebf830900db522d6c8fd74d1900dcfc733462e9a12e942b00b4ac94"
"checksum wasm-bindgen-futures 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "7add542ea1ac7fdaa9dc25e031a6af33b7d63376292bd24140c637d00d1c312a"
-"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-macro 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "2cd85aa2c579e8892442954685f0d801f9129de24fa2136b2c6a539c76b65776"
+"checksum wasm-bindgen-macro-support 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "8eb197bd3a47553334907ffd2f16507b4f4f01bbec3ac921a7719e0decdfe72a"
+"checksum wasm-bindgen-shared 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "a91c2916119c17a8e316507afaaa2dd94b47646048014bbdf6bef098c1bb58ad"
"checksum wasm-bindgen-test 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)" = "648da3460c6d2aa04b715a936329e2e311180efe650b2127d6267f4193ccac14"
"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.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 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fc1e1b60b090bf29758c6c42da2d2d6d54aa97dc73e3ccd1cd99d664b4c754cf"
+"checksum yew-macro 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f1d2fe46d7922ecd99af4e5b4eddcab58c70ec741e31de6e1b910d5873a3095f"
diff --git a/crate/yew_styles/Cargo.toml b/crate/yew_styles/Cargo.toml
index 488c432..9d856a9 100644
--- a/crate/yew_styles/Cargo.toml
+++ b/crate/yew_styles/Cargo.toml
@@ -1,8 +1,8 @@
[package]
name = "yew_styles"
-version = "0.3.0"
+version = "0.3.1"
description = "Framework styles for yew"
-documentation = "https://docs.rs/crate/yew_styles/0.3.0"
+documentation = "https://docs.rs/crate/yew_styles/0.3.1"
authors = ["Francisco Jesus Navarro Cortes "]
edition = "2018"
license = "MIT"
@@ -15,8 +15,8 @@ readme = "README.md"
crate-type = ["cdylib", "rlib"]
[dependencies]
-wasm-bindgen = "0.2.60"
-yew = { version="0.15", features = ["toml", "yaml", "msgpack", "cbor", "web_sys"] }
+wasm-bindgen = "0.2"
+yew = { version="0.16", 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 f52007b..38f636c 100644
--- a/crate/yew_styles/README.md
+++ b/crate/yew_styles/README.md
@@ -14,7 +14,7 @@ however, it is not necessary to worry about the sass module only it needs to be
### How install it
1. Install the sass module: `npm install yew-styles`
-2. Add the yew_style crate in Cargo.toml file: `yew_styles = "0.3.0"`
+2. Add the yew_style crate in Cargo.toml file: `yew_styles = "0.3.1"`
3. Import the main.css file in you main javascript/typescript file project:
```typescript
import 'node_modules/yew-styles/main.css';
diff --git a/crate/yew_styles/src/components/button.rs b/crate/yew_styles/src/components/button.rs
index 6e75030..c395b7d 100644
--- a/crate/yew_styles/src/components/button.rs
+++ b/crate/yew_styles/src/components/button.rs
@@ -2,6 +2,7 @@ use crate::styles::{get_pallete, get_style, Palette, Style};
use wasm_bindgen_test::*;
use web_sys::window;
use yew::prelude::*;
+use yew::{utils, App};
/// The standard sizes for button
#[derive(Clone)]
@@ -206,14 +207,8 @@ fn should_trigger_action_when_button_clicked() {
children: Children::new(vec![html! {}]),
};
- let link = ComponentLink::new();
-
- let mut button = Button::create(props.clone(), link);
-
props.onsignal.emit(());
- button.change(props);
-
let updated_content = window()
.unwrap()
.document()
@@ -228,49 +223,28 @@ fn should_trigger_action_when_button_clicked() {
#[wasm_bindgen_test]
fn should_create_button_component() {
- let on_add_child = Callback::from(|_| {
- let body = window().unwrap().document().unwrap().body().unwrap();
-
- let child_element = window()
- .unwrap()
- .document()
- .unwrap()
- .create_element("div")
- .unwrap();
-
- child_element.set_text_content(Some("child"));
- child_element.set_id("child");
- body.append_child(&child_element).unwrap();
- });
-
let props = Props {
class_name: String::from("test-button"),
size: Size::Medium,
button_style: Style::Regular,
- onsignal: on_add_child,
+ onsignal: Callback::noop(),
button_type: Palette::Standard,
- children: Children::new(vec![html! {{"parent"}
}]),
+ children: Children::new(vec![html! {{"result"}
}]),
};
- let link = ComponentLink::new();
-
- let mut button = Button::create(props.clone(), link.clone());
-
- props.onsignal.emit(());
-
- button.change(props);
+ let button: App