Skip to content

Commit c428c02

Browse files
committed
added changes to /rules page
Signed-off-by: amanycodes <amanycodes@gmail.com>
1 parent e18dc4e commit c428c02

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.item {
2+
background-color: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-5));
3+
}

web/ui/mantine-ui/src/pages/RulesPage.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { NumberParam, useQueryParam, withDefault } from "use-query-params";
3434
import { useSettings } from "../state/settingsSlice";
3535
import { useEffect } from "react";
3636
import CustomInfiniteScroll from "../components/CustomInfiniteScroll";
37+
import classes from "./RulesPage.module.css";
3738

3839
const healthBadgeClass = (state: string) => {
3940
switch (state) {
@@ -144,19 +145,10 @@ export default function RulesPage() {
144145
<CustomInfiniteScroll
145146
allItems={g.rules}
146147
child={({ items }) => (
147-
<Accordion multiple variant="separated">
148+
<Accordion multiple variant="separated" classNames={classes}>
148149
{items.map((r, j) => (
149150
<Accordion.Item
150151
mt={rem(5)}
151-
styles={{
152-
item: {
153-
// TODO: This transparency hack is an OK workaround to make the collapsed items
154-
// have a different background color than their surrounding group card in dark mode,
155-
// but it would be better to use CSS to override the light/dark colors for
156-
// collapsed/expanded accordion items.
157-
backgroundColor: "#c0c0c015",
158-
},
159-
}}
160152
key={j}
161153
value={j.toString()}
162154
style={{

0 commit comments

Comments
 (0)