accordion: Fix accordion to size full. (#1083)

- Remove `accordion.background` color from themes.
This commit is contained in:
Jason Lee 2025-07-23 18:45:02 +08:00 committed by GitHub
parent a2b91a7a2b
commit f458cb83f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 43 additions and 68 deletions

View file

@ -79,7 +79,8 @@ impl Render for AccordionStory {
h_flex()
.items_center()
.justify_between()
.gap_2()
.gap_4()
.flex_wrap()
.child(
ButtonGroup::new("toggle-size")
.outline()
@ -116,40 +117,44 @@ impl Render for AccordionStory {
})),
)
.child(
Checkbox::new("multiple")
.label("Multiple")
.checked(self.multiple)
.on_click(cx.listener(|this, checked, _, cx| {
this.multiple = *checked;
cx.notify();
})),
)
.child(
Checkbox::new("show_icon")
.label("Show Icon")
.checked(self.show_icon)
.on_click(cx.listener(|this, checked, _, cx| {
this.show_icon = *checked;
cx.notify();
})),
)
.child(
Checkbox::new("disabled")
.label("Disabled")
.checked(self.disabled)
.on_click(cx.listener(|this, checked, _, cx| {
this.disabled = *checked;
cx.notify();
})),
)
.child(
Checkbox::new("bordered")
.label("Bordered")
.checked(self.bordered)
.on_click(cx.listener(|this, checked, _, cx| {
this.bordered = *checked;
cx.notify();
})),
h_flex()
.gap_2()
.child(
Checkbox::new("multiple")
.label("Multiple")
.checked(self.multiple)
.on_click(cx.listener(|this, checked, _, cx| {
this.multiple = *checked;
cx.notify();
})),
)
.child(
Checkbox::new("show_icon")
.label("Icon")
.checked(self.show_icon)
.on_click(cx.listener(|this, checked, _, cx| {
this.show_icon = *checked;
cx.notify();
})),
)
.child(
Checkbox::new("disabled")
.label("Disabled")
.checked(self.disabled)
.on_click(cx.listener(|this, checked, _, cx| {
this.disabled = *checked;
cx.notify();
})),
)
.child(
Checkbox::new("bordered")
.label("Bordered")
.checked(self.bordered)
.on_click(cx.listener(|this, checked, _, cx| {
this.bordered = *checked;
cx.notify();
})),
),
),
)
.child(

View file

@ -83,6 +83,7 @@ impl RenderOnce for Accordion {
v_flex()
.id(self.id)
.size_full()
.when(self.bordered, |this| this.gap_1())
.children(
self.children

View file

@ -11,7 +11,6 @@
"accent.background": "#25292d",
"accent.foreground": "#feffff",
"accordion.active.background": "#003a5b",
"accordion.background": "#040404",
"accordion.hover.background": "#4b6479",
"background": "#040404",
"border": "#282828",
@ -170,7 +169,6 @@
"accent.background": "#36345f",
"accent.foreground": "#f8dcc0",
"accordion.active.background": "#003a5b",
"accordion.background": "#1f1d45",
"accordion.hover.background": "#4b6479",
"background": "#1f1d45",
"border": "#333150",

View file

@ -11,7 +11,6 @@
"accent.background": "#322F2D",
"accent.foreground": "#ebdbb2",
"accordion.active.background": "#504945",
"accordion.background": "#282828",
"accordion.hover.background": "#665c54",
"background": "#1C1C1C",
"border": "#3a3a3a",

View file

@ -11,7 +11,6 @@
"accent.background": "#ECECED",
"accent.foreground": "#5C6773",
"accordion.active.background": "#F3F4F5",
"accordion.background": "#FAFAFA",
"accordion.hover.background": "#D9DCE3",
"background": "#fafafa",
"foreground": "#5C6773",
@ -165,7 +164,6 @@
"accent.background": "#191F2A",
"accent.foreground": "#B3B1AD",
"accordion.active.background": "#1F2430",
"accordion.background": "#0A0E14",
"accordion.hover.background": "#333F58",
"background": "#0F1419",
"border": "#444444",

View file

@ -11,7 +11,6 @@
"accent.background": "#D6DAE2",
"accent.foreground": "#4c4f69",
"accordion.active.background": "#dce0e8",
"accordion.background": "#EFF1F5",
"accordion.hover.background": "#acb0be",
"background": "#E5E9EF",
"border": "#CCD0DA",
@ -408,7 +407,6 @@
"accent.background": "#3b3f4f",
"accent.foreground": "#c6d0f5",
"accordion.active.background": "#414559",
"accordion.background": "#303446",
"accordion.hover.background": "#51576d",
"background": "#232634",
"border": "#3e4255",
@ -548,7 +546,6 @@
"accent.background": "#24273a",
"accent.foreground": "#cad3f5",
"accordion.active.background": "#363a4f",
"accordion.background": "#24273a",
"accordion.hover.background": "#494d64",
"action_bar.background": "#1E2030",
"background": "#1E2030",
@ -700,7 +697,6 @@
"accent.background": "#2e2e3e",
"accent.foreground": "#cdd6f4",
"accordion.active.background": "#302d41",
"accordion.background": "#1e1e2e",
"accordion.hover.background": "#575268",
"background": "#181825",
"border": "#313244",

View file

@ -11,7 +11,6 @@
"accent.background": "#E7E5D4",
"accent.foreground": "#5F6D75",
"accordion.active.background": "#d3c6aa",
"accordion.background": "#e0e0e0",
"accordion.hover.background": "#E7E5D4",
"background": "#FEFCEE",
"border": "#E7E5D4",
@ -165,7 +164,6 @@
"accent.background": "#3c4448",
"accent.foreground": "#d3c6aa",
"accordion.active.background": "#2E383B",
"accordion.background": "#262E34",
"accordion.hover.background": "#485156",
"background": "#262E34",
"border": "#40484c",

View file

@ -11,7 +11,6 @@
"accent.background": "#171717",
"accent.foreground": "#FFFFCE",
"accordion.active.background": "#1e1e1e",
"accordion.background": "#2e2e2e",
"accordion.hover.background": "#3e3e3e",
"background": "#000000",
"border": "#252525",
@ -51,8 +50,8 @@
"base.yellow.light": "#c9b536",
"base.blue": "#022d72",
"base.blue.light": "#0551cb",
"base.magenta": "#3a1d75",
"base.magenta.light": "#6c36c9",
"base.magenta": "#3a286c",
"base.magenta.light": "#58197a",
"base.cyan": "#027272",
"base.cyan.light": "#36c9c9"
},

View file

@ -11,7 +11,6 @@
"accent.background": "#ebdbb2",
"accent.foreground": "#3c3836",
"accordion.active.background": "#fbf1c7",
"accordion.background": "#ebdbb2",
"accordion.hover.background": "#d5c4a1",
"background": "#fbf1c7",
"border": "#d5c4a1",
@ -164,7 +163,6 @@
"accent.background": "#282828",
"accent.foreground": "#ebdbb2",
"accordion.active.background": "#282828",
"accordion.background": "#3c3836",
"accordion.hover.background": "#504945",
"background": "#1d2021",
"border": "#3e3936",

View file

@ -11,7 +11,6 @@
"accent.background": "#18151B",
"accent.foreground": "#a8a49d",
"accordion.active.background": "#003a5b",
"accordion.background": "#010101",
"accordion.hover.background": "#726E69",
"background": "#010101",
"border": "#333333",

View file

@ -11,7 +11,6 @@
"accent.background": "#D4E2E2",
"accent.foreground": "#1c1c1c",
"accordion.active.background": "#d3d3d3",
"accordion.background": "#e8e8e8",
"accordion.hover.background": "#c0c0c0",
"background": "#E4E4E4",
"border": "#CACACA",
@ -164,7 +163,6 @@
"accent.background": "#313E40",
"accent.foreground": "#e8e8e8",
"accordion.active.background": "#1c1c1c",
"accordion.background": "#1D1F21",
"accordion.hover.background": "#3a3a3a",
"background": "#1D1F21",
"border": "#34373c",

View file

@ -11,7 +11,6 @@
"accent.background": "#232323",
"accent.foreground": "#e8e8e8",
"accordion.active.background": "#444444",
"accordion.background": "#3a3a3a",
"accordion.hover.background": "#4E4847",
"background": "#151515",
"border": "#2e2e2e",

View file

@ -11,7 +11,6 @@
"accent.background": "#242223",
"accent.foreground": "#f7f7f7",
"accordion.active.background": "#003a5b",
"accordion.background": "#0e100a",
"accordion.hover.background": "#726E69",
"background": "#0e100a",
"border": "#333333",

View file

@ -162,7 +162,6 @@
"accent.background": "#353436",
"accent.foreground": "#CACCCA",
"accordion.active.background": "#1E1D1E",
"accordion.background": "#131313",
"accordion.hover.background": "#353436",
"background": "#131313",
"border": "#404040",

View file

@ -11,7 +11,6 @@
"accent.background": "#2B2525",
"accent.foreground": "#ebdbb2",
"accordion.active.background": "#504945",
"accordion.background": "#282828",
"accordion.hover.background": "#665c54",
"background": "#110D10",
"border": "#312B32",

View file

@ -11,7 +11,6 @@
"accent.background": "#003200",
"accent.foreground": "#00FF00",
"accordion.active.background": "#001900",
"accordion.background": "#0D0208",
"accordion.hover.background": "#003200",
"background": "#020d02",
"border": "#12410E",

View file

@ -11,7 +11,6 @@
"accent.background": "#d5d5d5",
"accent.foreground": "#383a42",
"accordion.active.background": "#fafafa",
"accordion.background": "#e5e5e5",
"accordion.hover.background": "#d5d5d5",
"background": "#E7E7E7",
"border": "#CACACA",
@ -165,7 +164,6 @@
"accent.background": "#292929",
"accent.foreground": "#abb2bf",
"accordion.active.background": "#282c34",
"accordion.background": "#3e4451",
"accordion.hover.background": "#444444",
"background": "#1A1A1A",
"border": "#444444",

View file

@ -159,7 +159,6 @@
"accent.background": "#2b2f30",
"accent.foreground": "#f8f8f2",
"accordion.active.background": "#1b1d1e",
"accordion.background": "#232526",
"accordion.hover.background": "#2b2d2e",
"background": "#1b1d1e",
"border": "#3b3b3b",

View file

@ -175,7 +175,6 @@
"accent.background": "#15333A",
"accent.foreground": "#fdf6e3",
"accordion.active.background": "#073642",
"accordion.background": "#002b36",
"accordion.hover.background": "#073642",
"background": "#002B36",
"border": "#083e4c",

View file

@ -11,7 +11,6 @@
"accent.background": "#1c1d39",
"accent.foreground": "#ecf0c1",
"accordion.active.background": "#003a5b",
"accordion.background": "#0F111B",
"accordion.hover.background": "#4b6479",
"background": "#0F111B",
"border": "#272C42",

View file

@ -11,7 +11,6 @@
"accent.background": "#2C3045",
"accent.foreground": "#c0caf5",
"accordion.active.background": "#414868",
"accordion.background": "#1a1b26",
"accordion.hover.background": "#292e42",
"background": "#1a1b26",
"border": "#292e42",
@ -162,7 +161,6 @@
"accent.background": "#414868",
"accent.foreground": "#c0caf5",
"accordion.active.background": "#414868",
"accordion.background": "#24283b",
"accordion.hover.background": "#292e42",
"background": "#24283b",
"border": "#3d4462",
@ -306,7 +304,6 @@
"accent.background": "#32364E",
"accent.foreground": "#c0caf5",
"accordion.active.background": "#444b6a",
"accordion.background": "#222436",
"accordion.hover.background": "#2d3149",
"background": "#222436",
"border": "#323752",

View file

@ -11,7 +11,6 @@
"accent.background": "#1F1F1F",
"accent.foreground": "#dcdcdc",
"accordion.active.background": "#1e1e1e",
"accordion.background": "#2e2e2e",
"accordion.hover.background": "#3e3e3e",
"background": "#141414",
"border": "#3e3e3e",