-
-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Case:
use leptos_node_ref::AnyNodeRef;
use radix_leptos_label::Label as LabelPrimitive;
use tailwind_fuse::*;
use leptos_style::Style;
#[component]
pub fn Label(
#[prop(into, optional)] style: Signal<Style>,
) -> impl IntoView {
view! {
<LabelPrimitive
attr:style=style.get()
/>
}
}
gives me the error:
error[E0277]: the trait bound `leptos_style::Style: IntoAttributeValue` is not satisfied
--> packages/leptos/label/src/default.rs:21:24
|
19 | / view! {
20 | | <LabelPrimitive
21 | | attr:style=style.get()
| | ^^^^^^^^^^^ the trait `FnMut()` is not implemented for `leptos_style::Style`
... |
25 | | </LabelPrimitive>
26 | | }
| |_____- required by a bound introduced by this call
|
= note: required for `leptos_style::Style` to implement `ReactiveFunction`
= note: required for `leptos_style::Style` to implement `AttributeValue`
= note: required for `leptos_style::Style` to implement `IntoAttributeValue`
There is an option to use .to_string()
which solves the problem but add unnecessary verbose into the code.
I have set up a small PR implementing IntoAttributeValue.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request