Feat: wire up props macro

This commit is contained in:
Jonathan Kelley committed 2021-03-09 14:45:52 -05:00
1 parent 7158bc3575
commit 37f5a7ad33
6 files changed
+87 -59

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ pub trait Properties: PartialEq {
pub struct EmptyBuilder;
impl EmptyBuilder {
pub fn build() -> () {
pub fn build(self) -> () {
()
}
}
+1 -1
View File
@@ -130,7 +130,7 @@ pub(crate) mod innerlude {
/// Re-export common types for ease of development use.
/// Essential when working with the html! macro
pub mod prelude {
// pub use crate::component::Properties;
pub use crate::component::{fc_to_builder, Properties};
pub use crate::context::Context;
use crate::nodes;
pub use crate::virtual_dom::VirtualDom;
+2 -1
View File
@@ -528,9 +528,10 @@ pub fn attr<'a>(name: &'static str, value: &'a str) -> Attribute<'a> {
// _props: T
pub fn virtual_child<'a, 'b, T: crate::innerlude::Properties>(
ctx: &'b NodeCtx<'a>,
p: T,
f: FC<T>,
p: T,
) -> VNode<'a> {
// crate::nodes::VComponent
todo!()
// VNode::Component()
}