mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-17 14:10:14 +02:00
Add tabs component
This commit is contained in:
@@ -14,3 +14,4 @@ export * from './select';
|
|||||||
export * from './date-picker';
|
export * from './date-picker';
|
||||||
export * from './scroll-area';
|
export * from './scroll-area';
|
||||||
export * from './paper';
|
export * from './paper';
|
||||||
|
export * from './tabs';
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import {
|
||||||
|
Tabs as MantineTabs,
|
||||||
|
TabsProps as MantineTabsProps,
|
||||||
|
} from '@mantine/core';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
type TabsProps = MantineTabsProps;
|
||||||
|
|
||||||
|
const StyledTabs = styled(MantineTabs)`
|
||||||
|
button[data-active] {
|
||||||
|
border-color: var(--primary-color);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-color: var(--primary-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
export const Tabs = ({ children, ...props }: TabsProps) => {
|
||||||
|
return <StyledTabs {...props}>{children}</StyledTabs>;
|
||||||
|
};
|
||||||
|
|
||||||
|
Tabs.List = StyledTabs.List;
|
||||||
|
Tabs.Panel = StyledTabs.Panel;
|
||||||
|
Tabs.Tab = StyledTabs.Tab;
|
||||||
Reference in New Issue
Block a user