release 0.7

This commit is contained in:
Maccesch 2023-09-30 18:24:06 +01:00
parent 7e988c42ea
commit c45c31fa9a
62 changed files with 161 additions and 124 deletions

View file

@ -3,7 +3,7 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] -
## [0.7.0] - 2023-09-30
### New Functions 🚀
@ -46,8 +46,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `use_websocket` can use relative urls now
- Callbacks in options don't require to be cloneable anymore
- Callback in `use_raf_fn` doesn't require to be cloneable anymore
- All (!) functions can now be safely called on the server. Specifically this includes the following that
- panicked on the server:
- All (!) functions can now be safely called on the server. Specifically this includes the following that before
panicked on the server:
- `use_scroll`
- `use_event_listener`
- `use_element_hover`

View file

@ -1,6 +1,6 @@
[package]
name = "leptos-use"
version = "0.7.0-rc"
version = "0.7.0"
edition = "2021"
authors = ["Marc-Stefan Cassola"]
categories = ["gui", "web-programming"]
@ -13,7 +13,7 @@ repository = "https://github.com/Synphonyte/leptos-use"
homepage = "https://leptos-use.rs"
[dependencies]
leptos = "0.5.0-rc3"
leptos = "0.5"
wasm-bindgen = "0.2"
js-sys = "0.3"
default-struct-builder = "0.5"

View file

@ -13,7 +13,7 @@
<a href="https://crates.io/crates/leptos-use"><img src="https://img.shields.io/crates/v/leptos-use.svg?label=&color=%232C1275" alt="Crates.io"/></a>
<a href="https://leptos-use.rs/server_side_rendering.html"><img src="https://img.shields.io/badge/-SSR-%236a214b" alt="SSR"></a>
<a href="https://leptos-use.rs"><img src="https://img.shields.io/badge/-docs%20%26%20demos-%239A233F" alt="Docs & Demos"></a>
<a href="https://leptos-use.rs"><img src="https://img.shields.io/badge/-51%20functions-%23EF3939" alt="51 Functions" /></a>
<a href="https://leptos-use.rs"><img src="https://img.shields.io/badge/-58%20functions-%23EF3939" alt="58 Functions" /></a>
</p>
<br/>
@ -82,7 +82,8 @@ python3 post_build.py use_storage
### New Function Template
To scaffold a new function quickly you can run `template/createfn.sh`. It requires that [`ffizer`](https://ffizer.github.io/) is installed.
To scaffold a new function quickly you can run `template/createfn.sh`. It requires that [`ffizer`](https://ffizer.github.io/) and Python 3 is installed.
This will create the function file in the src directory, scaffold an example directory and an entry in the book.
## Leptos compatibility
@ -90,4 +91,4 @@ To scaffold a new function quickly you can run `template/createfn.sh`. It requir
|---------------|---------------------------|
| <= 0.3 | 0.3 |
| 0.4, 0.5, 0.6 | 0.4 |
| main | 0.5.0-alpha/beta/rc |
| 0.7 | 0.5 |

View file

@ -64,7 +64,7 @@ def add_to_compat_table(leptos_version: str, crate_version: str, original_text:
if table_row is None:
lines.append(f"| {crate_version} | {leptos_version} |")
elif re.search(rf"^\| .*? {crate_version}\s*\| {leptos_version}", table_row) is not None:
elif re.search(rf"^\| (.* )?{crate_version}\s*\| {leptos_version}", table_row) is not None:
return original_text
else:
index = table_row.index("|", 1)

View file

@ -12,6 +12,6 @@
<a href="https://crates.io/crates/leptos-use"><img src="https://img.shields.io/crates/v/leptos-use.svg?label=&color=%232C1275" alt="Crates.io"/></a>
<a href="https://leptos-use.rs/server_side_rendering.html"><img src="https://img.shields.io/badge/-SSR-%236a214b" alt="SSR"></a>
<a href="./get_started.html"><img src="https://img.shields.io/badge/-docs%20%26%20demos-%239A233F" alt="Docs & Demos"></a>
<a href="./functions.html"><img src="https://img.shields.io/badge/-51%20functions-%23EF3939" alt="51 Functions" /></a>
<a href="./functions.html"><img src="https://img.shields.io/badge/-58%20functions-%23EF3939" alt="58 Functions" /></a>
</p>
</div>

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -11,10 +11,10 @@ axum = { version = "0.6.4", optional = true }
console_error_panic_hook = "0.1"
console_log = "1"
cfg-if = "1"
leptos = { version = "0.5.0-rc3", features = ["nightly"] }
leptos_axum = { version = "0.5.0-rc3", optional = true }
leptos_meta = { version = "0.5.0-rc3", features = ["nightly"] }
leptos_router = { version = "0.5.0-rc3", features = ["nightly"] }
leptos = { version = "0.5", features = ["nightly"] }
leptos_axum = { version = "0.5", optional = true }
leptos_meta = { version = "0.5", features = ["nightly"] }
leptos_router = { version = "0.5", features = ["nightly"] }
leptos-use = { path = "../..", features = ["storage"] }
log = "0.4"
simple_logger = "4"

View file

@ -64,10 +64,24 @@ fn HomePage() -> impl IntoView {
debounced_fn();
view! {
<h1>Leptos-Use SSR Example</h1>
<button on:click=on_click>Click Me: {count}</button>
<p>Locale zh-Hans-CN-u-nu-hanidec: {zh_count}</p>
<p>Press any key: {key}</p>
<p>Debounced called: {debounce_value}</p>
<h1>
Leptos-Use SSR Example
</h1>
<button on:click=on_click>
Click Me:
{count}
</button>
<p>
Locale zh-Hans-CN-u-nu-hanidec:
{zh_count}
</p>
<p>
Press any key:
{key}
</p>
<p>
Debounced called:
{debounce_value}
</p>
}
}

View file

@ -61,7 +61,7 @@ pub fn ErrorTemplate(
// a unique key for each item as a reference
key=|(index, _error)| *index
// renders each item to a view
view=move |error| {
children=move |error| {
let error_string = error.1.to_string();
let error_code = error.1.status_code();
view! {

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -22,10 +22,10 @@ fn Demo() -> impl IntoView {
<For
each=move || (1..7)
key=|i| *i
view=move |i| {
view! { <input type="text" data-id=i class="!my-0 !min-w-0" placeholder=i/> }
}
/>
let:i
>
<input type="text" data-id=i class="!my-0 !min-w-0" placeholder=i/>
</For>
</div>

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -42,29 +42,27 @@ fn Demo() -> impl IntoView {
<For
each=files
key=|f| f.name()
view=move |file| {
view! {
<div class="w-200px bg-black-200/10 ma-2 pa-6">
<p>
Name:
{file.name()}
</p>
<p>
Size:
{file.size()}
</p>
<p>
Type:
{file.type_()}
</p>
<p>
Last modified:
{file.last_modified()}
</p>
</div>
}
}
/>
let:file
>
<div class="w-200px bg-black-200/10 ma-2 pa-6">
<p>
Name:
{file.name()}
</p>
<p>
Size:
{file.size()}
</p>
<p>
Type:
{file.type_()}
</p>
<p>
Last modified:
{file.last_modified()}
</p>
</div>
</For>
</div>
</div>
</div>

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -21,6 +21,7 @@ fn Demo() -> impl IntoView {
set_icon.set(Some("favicon-leptos.ico".into()));
}
>
<img
class=img_classes.clone()
width="32"
@ -37,6 +38,7 @@ fn Demo() -> impl IntoView {
set_icon.set(Some("favicon-red.svg".into()));
}
>
<img
class=img_classes.clone()
width="32"
@ -53,6 +55,7 @@ fn Demo() -> impl IntoView {
set_icon.set(Some("favicon-green.svg".into()));
}
>
<img
class=img_classes.clone()
width="32"
@ -69,6 +72,7 @@ fn Demo() -> impl IntoView {
set_icon.set(Some("favicon-blue.svg".into()));
}
>
<img
class=img_classes.clone()
width="32"
@ -85,6 +89,7 @@ fn Demo() -> impl IntoView {
set_icon.set(Some("favicon-orange.svg".into()));
}
>
<img
class=img_classes
width="32"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -14,8 +14,11 @@ fn Demo() -> impl IntoView {
view! {
<pre lang="json">
coords: {move || if let Some(coords) = coords() {
format!(r#"{{
coords:
{move || {
if let Some(coords) = coords() {
format!(
r#"{{
accuracy: {},
latitude: {},
longitude: {},
@ -23,18 +26,25 @@ fn Demo() -> impl IntoView {
altitude_accuracy: {:?},
heading: {:?},
speed: {:?},
}}"#, coords.accuracy(), coords.latitude(), coords.longitude(), coords.altitude(), coords.altitude_accuracy(), coords.heading(), coords.speed())
} else {
"None".to_string()
}},
located_at: {located_at},
error: {move || if let Some(error) = error() {
error.message()
} else {"None".to_string()}},
</pre>
<button on:click=move |_| pause()>"Pause watch"</button>
<button on:click=move |_| resume()>"Resume watch"</button>
}
}}"#,
coords.accuracy(), coords.latitude(), coords.longitude(), coords.altitude(),
coords.altitude_accuracy(), coords.heading(), coords.speed()
)
} else {
"None".to_string()
}
}}
,
located_at:
{located_at}
,
error:
{move || if let Some(error) = error() { error.message() } else { "None".to_string() }}
,
</pre>
<button on:click=move |_| pause()>"Pause watch"</button>
<button on:click=move |_| resume()>"Resume watch"</button>
}
}
fn main() {

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -14,13 +14,19 @@ fn Demo() -> impl IntoView {
view! {
<Note class="mb-2">
For demonstration purpose, the idle timeout is set to <b>5s</b> in this demo (default 1min).
For demonstration purpose, the idle timeout is set to
<b>
5s
</b>
in this demo (default 1min).
</Note>
<div class="mb-2">
Idle: <BooleanDisplay value=idle/>
Idle:
<BooleanDisplay value=idle/>
</div>
<div>
Inactive: <b>{idled_for}s</b>
Inactive:
<b>{idled_for} s</b>
</div>
}
}

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -46,6 +46,7 @@ fn Demo() -> impl IntoView {
mouse_default.y.get(), mouse_default.source_type.get()
)
}}
</pre>
<p class="font-semibold">"Extractor Usage"</p>
<Note>"Only works when the mouse is over the demo element"</Note>
@ -59,6 +60,7 @@ fn Demo() -> impl IntoView {
.get(), mouse_with_extractor.y.get(), mouse_with_extractor.source_type.get()
)
}}
</pre>
</div>
}

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -46,8 +46,10 @@ fn Demo() -> impl IntoView {
each=move || enum_msgs.get()
// list only grows so this is fine here
key=|message| message.0
view=|message| view! { <div>"Mutation Attribute: " <code>{message.1}</code></div> }
/>
let:message
>
<div>"Mutation Attribute: " <code>{message.1}</code></div>
</For>
</div>
}
}

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -51,6 +51,7 @@ fn Demo() -> impl IntoView {
set_state
.update(|s| s.count = event_target_value(&e).parse::<f64>().unwrap() as u32)
}
type="number"
min="0"
step="1"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -7,7 +7,10 @@ fn Demo() -> impl IntoView {
let timestamp = use_timestamp();
view! {
<div>Timestamp: {timestamp}</div>
<div>
Timestamp:
{timestamp}
</div>
}
}

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -182,10 +182,10 @@ fn Demo() -> impl IntoView {
<For
each=move || history.get().into_iter().enumerate()
key=|(index, _)| *index
view=move |(_, message)| {
view! { <div>{message}</div> }
}
/>
let:item
>
<div>{item.1}</div>
</For>
</div>
<div class="w-full lg:w-1/2">
@ -216,11 +216,10 @@ fn Demo() -> impl IntoView {
<For
each=move || history2.get().into_iter().enumerate()
key=|(index, _)| *index
view=move |(_, message)| {
view! { <li>{message}</li> }
}
/>
let:item
>
<li>{item.1}</li>
</For>
</ul>
</div>
</div>

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { version = "0.5.0-rc3", features = ["nightly", "csr"] }
leptos = { version = "0.5", features = ["nightly", "csr"] }
console_error_panic_hook = "0.1"
console_log = "1"
log = "0.4"

View file

@ -18,8 +18,5 @@ pub fn BooleanDisplay(
)
};
view! { <span class=class>
{ move || if value.get() { true_str} else { false_str } }
</span>
}
view! { <span class=class>{move || if value.get() { true_str } else { false_str }}</span> }
}

View file

@ -4,6 +4,5 @@ use leptos::*;
pub fn Note(#[prop(optional, into)] class: String, children: Children) -> impl IntoView {
let class = format!("note {class}");
view! { <div class=class>{ children() }</div>
}
view! { <div class=class>{children()}</div> }
}