Add tabs component

This commit is contained in:
jeffvli
2022-11-07 04:04:32 -08:00
parent cd56783c96
commit e774cdf031
2 changed files with 26 additions and 0 deletions
+1
View File
@@ -14,3 +14,4 @@ export * from './select';
export * from './date-picker';
export * from './scroll-area';
export * from './paper';
export * from './tabs';
+25
View File
@@ -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;