Move the manganis into attribute value implementation into dioxus core (#2765)

This commit is contained in:
Evan Almloff authored and GitHub committed 2024-08-01 17:38:01 -05:00
1 parent e0bb67b476
commit 9dbdf74a1e
4 files changed
+11 -1

No files matched your search

+7
View File
@@ -1096,6 +1096,13 @@ impl<T: IntoAttributeValue> IntoAttributeValue for Option<T> {
}
}
#[cfg(feature = "manganis")]
impl IntoAttributeValue for manganis::ImageAsset {
fn into_value(self) -> AttributeValue {
AttributeValue::Text(self.path().to_string())
}
}
/// A trait for anything that has a dynamic list of attributes
pub trait HasAttributes {
/// Push an attribute onto the list of attributes