OptionCategory: Use text.secondary for closed categories (#102925)

* OptionCategory: Design update

* Update
This commit is contained in:
Torkel Ödegaard
2025-03-27 15:41:16 +01:00
committed by GitHub
parent f9471ac10b
commit 031a047565
2 changed files with 13 additions and 2 deletions
@@ -20,7 +20,9 @@ export function ElementEditPane({ element, editPane }: Props) {
return (
<div className={styles.wrapper}>
<EditPaneHeader element={element} editPane={editPane} />
<ScrollContainer showScrollIndicators={true}>{categories.map((cat) => cat.render())}</ScrollContainer>
<ScrollContainer showScrollIndicators={true}>
<div className={styles.categories}>{categories.map((cat) => cat.render())}</div>
</ScrollContainer>
</div>
);
}
@@ -33,5 +35,10 @@ function getStyles(theme: GrafanaTheme2) {
flex: '1 1 0',
height: '100%',
}),
categories: css({
display: 'flex',
flexDirection: 'column',
borderBottom: `1px solid ${theme.colors.border.weak}`,
}),
};
}
@@ -107,7 +107,7 @@ export const OptionsPaneCategory = React.memo(
{/* this just provides a better experience for mouse users */}
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
<div className={headerStyles} onClick={onToggle}>
<h6 id={`button-${id}`} className={styles.title}>
<h6 id={`button-${id}`} className={cx(styles.title, isExpanded && styles.titleExpanded)}>
{renderTitle(isExpanded)}
</h6>
@@ -149,6 +149,10 @@ const getStyles = (theme: GrafanaTheme2) => ({
fontSize: '1rem',
fontWeight: theme.typography.fontWeightMedium,
margin: 0,
color: theme.colors.text.secondary,
}),
titleExpanded: css({
color: theme.colors.text.primary,
}),
header: css({
display: 'flex',