dioxus_tw_components/components/molecules/table/
style.rs

1use super::props::*;
2use crate::attributes::*;
3
4impl Class for TableProps {
5    fn base(&self) -> &'static str {
6        "w-full caption-bottom text-sm text-foreground bg-background"
7    }
8}
9
10impl Class for TableHeaderProps {
11    fn base(&self) -> &'static str {
12        "[&_tr]:border-b"
13    }
14}
15
16impl Class for TableBodyProps {
17    fn base(&self) -> &'static str {
18        "[&_tr:last-child]:border-0"
19    }
20}
21
22impl Class for TableFooterProps {
23    fn base(&self) -> &'static str {
24        "border-t bg-muted/50 font-medium last:[&>tr]:border-b-0 hover:bg-muted/70"
25    }
26}
27
28impl Class for TableHeadProps {
29    fn base(&self) -> &'static str {
30        "h-10 px-2 text-left align-middle font-medium text-muted-foreground"
31    }
32}
33
34impl Class for TableRowProps {
35    fn base(&self) -> &'static str {
36        "border-b transition-colors hover:bg-muted/50"
37    }
38}
39
40impl Class for TableCellProps {
41    fn base(&self) -> &'static str {
42        "p-2 align-middle"
43    }
44}
45
46impl Class for TableCaptionProps {
47    fn base(&self) -> &'static str {
48        "mt-4 text-sm text-muted-foreground"
49    }
50}