mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
fix-alerts-accordion-theme
Signed-off-by: amanycodes <amanycodes@gmail.com>
This commit is contained in:
parent
a5ffa83be8
commit
28e3de1b7c
8
web/ui/mantine-ui/src/pages/AlertsPage.module.css
Normal file
8
web/ui/mantine-ui/src/pages/AlertsPage.module.css
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
.item {
|
||||||
|
background-color: light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-5));
|
||||||
|
}
|
||||||
|
|
||||||
|
.item[data-active] {
|
||||||
|
background-color: light-dark(var(--mantine-color-body-light), var(--mantine-color-body-dark));
|
||||||
|
}
|
||||||
|
|
|
@ -36,6 +36,7 @@ import { useDebouncedValue } from "@mantine/hooks";
|
||||||
import { KVSearch } from "@nexucis/kvsearch";
|
import { KVSearch } from "@nexucis/kvsearch";
|
||||||
import { inputIconStyle } from "../styles";
|
import { inputIconStyle } from "../styles";
|
||||||
import CustomInfiniteScroll from "../components/CustomInfiniteScroll";
|
import CustomInfiniteScroll from "../components/CustomInfiniteScroll";
|
||||||
|
import classes from "./AlertsPage.module.css";
|
||||||
|
|
||||||
type AlertsPageData = {
|
type AlertsPageData = {
|
||||||
// How many rules are in each state across all groups.
|
// How many rules are in each state across all groups.
|
||||||
|
@ -276,19 +277,10 @@ export default function AlertsPage() {
|
||||||
<CustomInfiniteScroll
|
<CustomInfiniteScroll
|
||||||
allItems={g.rules}
|
allItems={g.rules}
|
||||||
child={({ items }) => (
|
child={({ items }) => (
|
||||||
<Accordion multiple variant="separated">
|
<Accordion multiple variant="separated" classNames={classes}>
|
||||||
{items.map((r, j) => {
|
{items.map((r, j) => {
|
||||||
return (
|
return (
|
||||||
<Accordion.Item
|
<Accordion.Item
|
||||||
styles={{
|
|
||||||
item: {
|
|
||||||
// TODO: This transparency hack is an OK workaround to make the collapsed items
|
|
||||||
// have a different background color than their surrounding group card in dark mode,
|
|
||||||
// but it would be better to use CSS to override the light/dark colors for
|
|
||||||
// collapsed/expanded accordion items.
|
|
||||||
backgroundColor: "#c0c0c015",
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
key={j}
|
key={j}
|
||||||
value={j.toString()}
|
value={j.toString()}
|
||||||
className={
|
className={
|
||||||
|
|
Loading…
Reference in a new issue