mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-16 21:50:35 +02:00
Add accordion component
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
import {
|
||||||
|
Accordion as MantineAccordion,
|
||||||
|
AccordionProps as MantineAccordionProps,
|
||||||
|
} from '@mantine/core';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
type AccordionProps = MantineAccordionProps;
|
||||||
|
|
||||||
|
const StyledAccordion = styled(MantineAccordion)`
|
||||||
|
& .mantine-Accordion-panel {
|
||||||
|
background: var(--paper-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mantine-Accordion-control {
|
||||||
|
background: var(--paper-bg);
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
export const Accordion = ({ children, ...props }: AccordionProps) => {
|
||||||
|
return <StyledAccordion {...props}>{children}</StyledAccordion>;
|
||||||
|
};
|
||||||
|
|
||||||
|
Accordion.Control = StyledAccordion.Control;
|
||||||
|
Accordion.Item = StyledAccordion.Item;
|
||||||
|
Accordion.Panel = StyledAccordion.Panel;
|
||||||
@@ -16,3 +16,4 @@ export * from './scroll-area';
|
|||||||
export * from './paper';
|
export * from './paper';
|
||||||
export * from './tabs';
|
export * from './tabs';
|
||||||
export * from './slider';
|
export * from './slider';
|
||||||
|
export * from './accordion';
|
||||||
|
|||||||
Reference in New Issue
Block a user