mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 10:53:33 +00:00
Migrate to Mantine v8 and Design Changes (#961)
* mantine v8 migration * various design changes and improvements
This commit is contained in:
parent
bea55d48a8
commit
c1330d92b2
473 changed files with 12469 additions and 11607 deletions
16
src/shared/components/switch/switch.module.css
Normal file
16
src/shared/components/switch/switch.module.css
Normal file
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
23
src/shared/components/switch/switch.tsx
Normal file
23
src/shared/components/switch/switch.tsx
Normal file
|
|
@ -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}
|
||||
/>
|
||||
);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue