Type Alias leptos::AttributeValue
source · pub type AttributeValue = Box<dyn IntoAttribute>;
Expand description
A type for taking anything that implements IntoAttribute
.
use leptos::*;
#[component]
pub fn MyHeading(
text: String,
#[prop(optional, into)] class: Option<AttributeValue>,
) -> impl IntoView {
view! {
<h1 class=class>{text}</h1>
}
}
Aliased Type§
struct AttributeValue(/* private fields */);