♻️ (pagetop): Props::unpack() exige &mut Context
This commit is contained in:
parent
ee1b48ff3f
commit
8577ca8a59
14 changed files with 280 additions and 190 deletions
|
|
@ -25,13 +25,13 @@
|
|||
//! ```rust,no_run
|
||||
//! # use pagetop::prelude::*;
|
||||
//! # use pagetop_htmx::prelude::*;
|
||||
//! # let cx = Context::default();
|
||||
//! # let mut cx = Context::default();
|
||||
//! let props = Props::new(hx::GET, "/api/items")
|
||||
//! .with_prop(PropsOp::set(hx::TARGET, "#list"))
|
||||
//! .with_prop(PropsOp::set(hx::SWAP, hx::swap::OUTER_HTML));
|
||||
//!
|
||||
//! let markup = html! {
|
||||
//! button (props.unpack(&cx)) { "Load" }
|
||||
//! button (props.unpack(&mut cx)) { "Load" }
|
||||
//! };
|
||||
//! ```
|
||||
//!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue