From 1a001d583433dc534ee1ec9bc7bb472d72695e45 Mon Sep 17 00:00:00 2001 From: luoxiao Date: Fri, 26 Jul 2024 00:16:19 +0800 Subject: [PATCH] feat: adds class prop --- thaw/src/accordion/accordion_item.rs | 5 ++- thaw/src/accordion/mod.rs | 5 ++- thaw/src/anchor/anchor_link.rs | 10 ++--- thaw/src/anchor/mod.rs | 8 ++-- .../src/auto_complete/auto_complete_option.rs | 9 +++- thaw/src/auto_complete/mod.rs | 4 +- thaw/src/avatar/mod.rs | 6 +-- thaw/src/back_top/mod.rs | 8 ++-- thaw/src/button/button_group.rs | 6 +-- thaw/src/button/mod.rs | 6 +-- thaw/src/calendar/mod.rs | 6 +-- thaw/src/card/card_footer.rs | 9 ++-- thaw/src/card/card_header.rs | 5 ++- thaw/src/card/card_preview.rs | 8 +++- thaw/src/card/mod.rs | 9 ++-- thaw/src/checkbox/checkbox_group.rs | 7 ++-- thaw/src/checkbox/mod.rs | 10 ++--- thaw/src/code/mod.rs | 8 ++-- thaw/src/color_picker/mod.rs | 2 +- thaw/src/combobox/combobox.rs | 5 ++- thaw/src/combobox/combobox_option.rs | 4 +- thaw/src/config_provider/mod.rs | 9 ++-- thaw/src/date_picker/mod.rs | 8 ++-- thaw/src/date_picker/panel/mod.rs | 2 +- thaw/src/dialog/dialog.rs | 7 ++-- thaw/src/dialog/dialog_actions.rs | 8 +++- thaw/src/dialog/dialog_body.rs | 8 +++- thaw/src/dialog/dialog_content.rs | 8 +++- thaw/src/dialog/dialog_surface.rs | 8 +++- thaw/src/dialog/dialog_title.rs | 8 +++- thaw/src/divider/mod.rs | 6 +-- thaw/src/drawer/drawer_body.rs | 8 +++- thaw/src/drawer/drawer_header.rs | 8 +++- thaw/src/drawer/drawer_header_title.rs | 4 +- thaw/src/drawer/inline_drawer.rs | 4 +- thaw/src/drawer/overlay_drawer.rs | 5 ++- thaw/src/grid/grid_item.rs | 6 +-- thaw/src/grid/mod.rs | 6 +-- thaw/src/input/mod.rs | 4 +- thaw/src/layout/layout_header.rs | 8 +++- thaw/src/layout/layout_sider.rs | 9 ++-- thaw/src/layout/mod.rs | 11 ++--- thaw/src/menu/menu_item.rs | 6 +-- thaw/src/menu/mod.rs | 2 +- thaw/src/message_bar/message_bar.rs | 4 +- thaw/src/message_bar/message_bar_body.rs | 8 +++- thaw/src/message_bar/message_bar_title.rs | 8 +++- thaw/src/nav/nav_drawer.rs | 5 ++- thaw/src/nav/nav_item.rs | 8 +++- thaw/src/popover/mod.rs | 2 +- thaw/src/progress_bar/progress_bar.rs | 4 +- thaw/src/progress_bar/progress_circle.rs | 6 +-- thaw/src/radio/mod.rs | 10 ++--- thaw/src/radio/radio_group.rs | 5 ++- thaw/src/scrollbar/mod.rs | 14 +++---- thaw/src/skeleton/skeleton.rs | 8 +++- thaw/src/skeleton/skeleton_item.rs | 6 +-- thaw/src/slider/mod.rs | 8 ++-- thaw/src/slider/slider_label.rs | 15 ++++--- thaw/src/spin_button/mod.rs | 6 +-- thaw/src/switch/mod.rs | 11 ++--- thaw/src/tab_list/mod.rs | 2 +- thaw/src/tab_list/tab.rs | 2 +- thaw/src/table/mod.rs | 42 +++++++++++++------ thaw/src/tag/mod.rs | 6 +-- thaw/src/time_picker/mod.rs | 10 ++--- thaw/src/toast/toast.rs | 8 +++- thaw/src/toast/toast_footer.rs | 8 +++- thaw/src/upload/mod.rs | 9 ++-- thaw/src/upload/upload_dragger.rs | 9 ++-- 70 files changed, 307 insertions(+), 210 deletions(-) diff --git a/thaw/src/accordion/accordion_item.rs b/thaw/src/accordion/accordion_item.rs index 5ff6f55..d48e50c 100644 --- a/thaw/src/accordion/accordion_item.rs +++ b/thaw/src/accordion/accordion_item.rs @@ -1,10 +1,11 @@ use crate::AccordionInjection; use leptos::{html, prelude::*}; use thaw_components::CSSTransition; -use thaw_utils::{mount_style, update, with, StoredMaybeSignal}; +use thaw_utils::{class_list, mount_style, update, with, StoredMaybeSignal}; #[component] pub fn AccordionItem( + #[prop(optional, into)] class: MaybeProp, /// Required value that identifies this item inside an Accordion component. #[prop(into)] value: MaybeSignal, @@ -41,7 +42,7 @@ pub fn AccordionItem( }; view! { -
+