optimize library headers (#1374)

This commit is contained in:
jeffvli
2025-12-14 02:33:19 -08:00
parent 4cc51c3700
commit b4b106222e
15 changed files with 247 additions and 155 deletions
@@ -143,11 +143,11 @@
background-color: transparent;
@mixin dark {
color: lighten(var(--theme-colors-foreground), 10%);
color: darken(var(--theme-colors-foreground), 15%);
}
@mixin light {
color: darken(var(--theme-colors-foreground), 10%);
color: lighten(var(--theme-colors-foreground), 10%);
}
}
+3 -2
View File
@@ -5,17 +5,18 @@ import styles from './spoiler.module.css';
import { Icon } from '/@/shared/components/icon/icon';
interface SpoilerProps extends MantineSpoilerProps {
interface SpoilerProps extends Omit<MantineSpoilerProps, 'hideLabel' | 'showLabel'> {
children?: ReactNode;
}
export const Spoiler = ({ children, ...props }: SpoilerProps) => {
export const Spoiler = ({ children, maxHeight = 56, ...props }: SpoilerProps) => {
const [expanded, setExpanded] = useState(false);
return (
<MantineSpoiler
classNames={{ content: styles.spoiler, control: styles.control }}
expanded={expanded}
maxHeight={maxHeight}
{...props}
hideLabel={<Icon icon="arrowUpS" size="lg" />}
onClick={() => setExpanded(!expanded)}