+
}
diff --git a/src/components/if_comp.rs b/src/components/if_comp.rs
index 94d8c78..ff6d007 100644
--- a/src/components/if_comp.rs
+++ b/src/components/if_comp.rs
@@ -15,7 +15,7 @@ pub struct ElseIf {
#[component]
pub fn If(
cx: Scope,
- cond: MaybeSignal
,
+ #[prop(into)] cond: MaybeSignal,
then: Then,
#[prop(default=vec![])] else_if: Vec,
#[prop(optional)] fallback: Option,
diff --git a/src/components/mod.rs b/src/components/mod.rs
index 4f92fcf..64ae4a0 100644
--- a/src/components/mod.rs
+++ b/src/components/mod.rs
@@ -2,8 +2,8 @@ mod if_comp;
mod option_comp;
pub use if_comp::*;
-use leptos::*;
pub use option_comp::*;
+use leptos::*;
#[slot]
pub struct Fallback {
diff --git a/src/modal/mod.rs b/src/modal/mod.rs
index b3917c5..a60c106 100644
--- a/src/modal/mod.rs
+++ b/src/modal/mod.rs
@@ -1,48 +1,49 @@
use crate::card::*;
+use crate::components::OptionComp;
use crate::teleport::*;
use crate::utils::mount_style::mount_style;
use leptos::*;
use stylers::style_sheet_str;
use leptos_icons::*;
+#[slot]
+pub struct ModalFooter {
+ children: ChildrenFn,
+}
+
#[component]
pub fn Modal(
cx: Scope,
- #[prop(optional, into)] title: Option>,
- children: Children,
- #[prop(optional)] footer: Option,
#[prop(into)] show: RwSignal,
+ #[prop(optional, into)] title: MaybeSignal<&'static str>,
+ children: Children,
+ #[prop(optional)] modal_footer: Option,
) -> impl IntoView {
let class_name = mount_style("modal", || style_sheet_str!("./src/modal/modal.css"));
- let header = move |cx| {
- view! {
- cx, class=class_name,
- <>
-
- {title}
-
- >
- }
- };
- let header_extra = move |cx| {
- view! {
- cx,
- <>
-
-
-
- >
- }
- };
view! {
cx, class=class_name,
-
- {children(cx)}
+
+
+
+ { title.get() }
+
+
+
+
+
+
+
+ { children(cx) }
+
+
+ { (footer.children)(cx) }
+
+