mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 21:10:12 +02:00
Migrate to Mantine v8 and Design Changes (#961)
* mantine v8 migration * various design changes and improvements
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
.thumb {
|
||||
background: var(--theme-colors-foreground);
|
||||
}
|
||||
|
||||
.track {
|
||||
background-color: var(--theme-colors-surface);
|
||||
border: 1px solid var(--theme-colors-border);
|
||||
|
||||
input:checked + & {
|
||||
background-color: var(--theme-colors-primary-filled);
|
||||
|
||||
& > .thumb {
|
||||
background: var(--theme-colors-primary-contrast);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import type { SwitchProps as MantineSwitchProps } from '@mantine/core';
|
||||
|
||||
import { Switch as MantineSwitch } from '@mantine/core';
|
||||
|
||||
import styles from './switch.module.css';
|
||||
|
||||
type SwitchProps = MantineSwitchProps;
|
||||
|
||||
export const Switch = ({ classNames, ...props }: SwitchProps) => {
|
||||
return (
|
||||
<MantineSwitch
|
||||
classNames={{
|
||||
input: styles.input,
|
||||
root: styles.root,
|
||||
thumb: styles.thumb,
|
||||
track: styles.track,
|
||||
...classNames,
|
||||
}}
|
||||
withThumbIndicator={false}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user