diff --git a/demo/src/pages/alert/mod.rs b/demo/src/pages/alert/mod.rs index eef247f..b648973 100644 --- a/demo/src/pages/alert/mod.rs +++ b/demo/src/pages/alert/mod.rs @@ -44,6 +44,12 @@ pub fn AlertPage() -> impl IntoView { + + "class" + "MaybeSignal" + "Default::default()" + "Additional classes for the alert element." + "title" "MaybeSignal" diff --git a/demo/src/pages/auto_complete/mod.rs b/demo/src/pages/auto_complete/mod.rs index b712319..c4a325f 100644 --- a/demo/src/pages/auto_complete/mod.rs +++ b/demo/src/pages/auto_complete/mod.rs @@ -131,6 +131,12 @@ pub fn AutoCompletePage() -> impl IntoView { "None" "On select callback function." + + "class" + "MaybeSignal" + "Default::default()" + "Additional classes for the autocomplete element." +

"AutoCompleteOption Properties"

diff --git a/demo/src/pages/avatar/mod.rs b/demo/src/pages/avatar/mod.rs index 5d39d15..dfe3dc9 100644 --- a/demo/src/pages/avatar/mod.rs +++ b/demo/src/pages/avatar/mod.rs @@ -58,6 +58,12 @@ pub fn AvatarPage() -> impl IntoView { "30" "Avatar's size." + + "class" + "MaybeSignal" + "Default::default()" + "Addtional classes for the avatar element." + diff --git a/demo/src/pages/button/mod.rs b/demo/src/pages/button/mod.rs index 64dae40..008e3bc 100644 --- a/demo/src/pages/button/mod.rs +++ b/demo/src/pages/button/mod.rs @@ -262,6 +262,16 @@ pub fn ButtonPage() -> impl IntoView { "Button's style." + + "class" + + "MaybeSignal" + + + "Default::default()" + + "Additional classes for the button element." + "variant" diff --git a/src/alert/mod.rs b/src/alert/mod.rs index a699cec..04f02b6 100644 --- a/src/alert/mod.rs +++ b/src/alert/mod.rs @@ -38,6 +38,7 @@ impl AlertVariant { #[component] pub fn Alert( + #[prop(optional, into)] class: MaybeSignal, #[prop(optional, into)] title: MaybeSignal, #[prop(into)] variant: MaybeSignal, children: Children, @@ -79,7 +80,10 @@ pub fn Alert( .into() }); view! { -
+
diff --git a/src/auto_complete/mod.rs b/src/auto_complete/mod.rs index 6964993..ce0c075 100644 --- a/src/auto_complete/mod.rs +++ b/src/auto_complete/mod.rs @@ -24,6 +24,7 @@ pub fn AutoComplete( #[prop(optional, into)] on_select: Option>, #[prop(optional, into)] disabled: MaybeSignal, #[prop(optional, into)] invalid: MaybeSignal, + #[prop(optional, into)] class: MaybeSignal, ) -> impl IntoView { mount_style("auto-complete", include_str!("./auto-complete.css")); let theme = use_theme(Theme::light); @@ -109,7 +110,7 @@ pub fn AutoComplete( view! { -
+
} } + + diff --git a/src/avatar/mod.rs b/src/avatar/mod.rs index 0982e76..e507b3b 100644 --- a/src/avatar/mod.rs +++ b/src/avatar/mod.rs @@ -9,6 +9,7 @@ pub fn Avatar( #[prop(optional, into)] src: MaybeSignal, #[prop(optional, into)] round: MaybeSignal, #[prop(default = MaybeSignal::Static(30), into)] size: MaybeSignal, + #[prop(optional, into)] class: MaybeSignal, ) -> impl IntoView { let theme = use_theme(Theme::light); let css_vars = create_memo(move |_| { @@ -28,7 +29,7 @@ pub fn Avatar( }); mount_style("avatar", include_str!("./avatar.css")); view! { - + {move || { let src = src.get(); (!src.is_empty()).then(|| view! { }) diff --git a/src/button/mod.rs b/src/button/mod.rs index 761e3aa..846329c 100644 --- a/src/button/mod.rs +++ b/src/button/mod.rs @@ -98,6 +98,7 @@ impl ButtonSize { #[component] pub fn Button( #[prop(optional, into)] style: MaybeSignal, + #[prop(optional, into)] class: MaybeSignal, #[prop(optional, into)] variant: MaybeSignal, #[prop(optional, into)] color: MaybeSignal, #[prop(optional, into)] size: MaybeSignal, @@ -221,6 +222,7 @@ pub fn Button( view! {