feat: props spread

This commit is contained in:
Koji AGAWA committed 2023-08-13 16:45:17 +09:00
1 parent 1ab5a03aef
commit d573f5dfd5
14 files changed
+301 -4

No files matched your search

+1
View File
@@ -12,6 +12,7 @@ keywords = ["dom", "ui", "gui", "react"]
[dependencies]
dioxus-core = { workspace = true }
dioxus-rsx = { workspace = true, features = ["hot_reload"], optional = true }
dioxus-html-internal-macro = { workspace = true }
serde = { version = "1", features = ["derive"], optional = true }
serde_repr = { version = "0.1", optional = true }
wasm-bindgen = { workspace = true, optional = true }
+10 -2
View File
@@ -1,9 +1,15 @@
#![allow(non_upper_case_globals)]
use dioxus_core::AttributeBox;
use dioxus_core::HasAttributesBox;
use dioxus_core::prelude::IntoAttributeValue;
use dioxus_html_internal_macro::impl_extension_attributes;
#[cfg(feature = "hot-reload-context")]
use dioxus_rsx::HotReloadingContext;
#[cfg(feature = "hot-reload-context")]
use crate::{map_global_attributes, map_svg_attributes};
use crate::{GlobalAttributes, SvgAttributes};
#[cfg(feature = "hot-reload-context")]
use dioxus_rsx::HotReloadingContext;
pub type AttributeDiscription = (&'static str, Option<&'static str>, bool);
@@ -106,6 +112,8 @@ macro_rules! impl_element {
}
impl GlobalAttributes for $name {}
impl_extension_attributes![ELEMENT $name { $($fil,)* }];
};
(
+7
View File
@@ -1,5 +1,10 @@
#![allow(non_upper_case_globals)]
use dioxus_core::HasAttributesBox;
use dioxus_core::AttributeBox;
use dioxus_core::prelude::IntoAttributeValue;
use dioxus_html_internal_macro::impl_extension_attributes;
use crate::AttributeDiscription;
#[cfg(feature = "hot-reload-context")]
@@ -62,6 +67,8 @@ macro_rules! trait_methods {
)*
None
}
impl_extension_attributes![GLOBAL $trait { $($name,)* }];
};
// Rename the incoming ident and apply a custom namespace