mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23: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
34
src/shared/components/tabs/tabs.tsx
Normal file
34
src/shared/components/tabs/tabs.tsx
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { Tabs as MantineTabs, TabsProps as MantineTabsProps, TabsPanelProps } from '@mantine/core';
|
||||
import { Suspense } from 'react';
|
||||
|
||||
import styles from './tabs.module.css';
|
||||
|
||||
type TabsProps = MantineTabsProps;
|
||||
|
||||
export const Tabs = ({ children, ...props }: TabsProps) => {
|
||||
return (
|
||||
<MantineTabs
|
||||
classNames={{
|
||||
list: styles.list,
|
||||
panel: styles.panel,
|
||||
root: styles.root,
|
||||
tab: styles.tab,
|
||||
}}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</MantineTabs>
|
||||
);
|
||||
};
|
||||
|
||||
const Panel = ({ children, ...props }: TabsPanelProps) => {
|
||||
return (
|
||||
<MantineTabs.Panel {...props}>
|
||||
<Suspense fallback={<></>}>{children}</Suspense>
|
||||
</MantineTabs.Panel>
|
||||
);
|
||||
};
|
||||
|
||||
Tabs.List = MantineTabs.List;
|
||||
Tabs.Panel = Panel;
|
||||
Tabs.Tab = MantineTabs.Tab;
|
||||
Loading…
Add table
Add a link
Reference in a new issue