mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 13:00:13 +02:00
optimize library headers (#1374)
This commit is contained in:
@@ -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%);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)}
|
||||
|
||||
Reference in New Issue
Block a user