mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
docs: fix Prop-drilling example in Parent-Child Communication section (#1865)
This commit is contained in:
parent
18ad7cde20
commit
0676348bd4
1 changed files with 3 additions and 3 deletions
|
@ -188,7 +188,7 @@ pub fn App() -> impl IntoView {
|
|||
}
|
||||
|
||||
#[component]
|
||||
pub fn Layout(d: WriteSignal<bool>) -> impl IntoView {
|
||||
pub fn Layout(set_toggled: WriteSignal<bool>) -> impl IntoView {
|
||||
view! {
|
||||
<header>
|
||||
<h1>"My Page"</h1>
|
||||
|
@ -200,7 +200,7 @@ pub fn Layout(d: WriteSignal<bool>) -> impl IntoView {
|
|||
}
|
||||
|
||||
#[component]
|
||||
pub fn Content(d: WriteSignal<bool>) -> impl IntoView {
|
||||
pub fn Content(set_toggled: WriteSignal<bool>) -> impl IntoView {
|
||||
view! {
|
||||
<div class="content">
|
||||
<ButtonD set_toggled/>
|
||||
|
@ -209,7 +209,7 @@ pub fn Content(d: WriteSignal<bool>) -> impl IntoView {
|
|||
}
|
||||
|
||||
#[component]
|
||||
pub fn ButtonD<F>(d: WriteSignal<bool>) -> impl IntoView {
|
||||
pub fn ButtonD<F>(set_toggled: WriteSignal<bool>) -> impl IntoView {
|
||||
todo!()
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue