UNPKG

1.29 kBTypeScriptView Raw
1import type { AccordionItemProps as RadixAccordionItemProps, AccordionMultipleProps, AccordionSingleProps } from '@radix-ui/react-accordion';
2import type { BrighteTheme } from '@spark-web/theme';
3import type { DataAttributeMap } from '@spark-web/utils/internal';
4import type { RefAttributes } from 'react';
5export declare type AccordionItemProps = Pick<RadixAccordionItemProps, 'children' | 'value'> & {
6 /** Sets data attributes on the component. */
7 data?: DataAttributeMap;
8 /** The html element to render the accordion item heading as. */
9 headingElement?: 'h2' | 'h3' | 'h4';
10 /** The heading of the accordion item. */
11 label: string;
12 /** The size of the heading. '1' is largest and '4' is smallest. */
13 level?: '1' | '2' | '3' | '4';
14 /** background colour of the component. */
15 background?: keyof BrighteTheme['color']['background'];
16};
17export declare function AccordionItem({ headingElement, background, children, data, label, level, value, }: AccordionItemProps): JSX.Element;
18export declare type AccordionProps = (Omit<AccordionSingleProps, 'asChild'> & RefAttributes<HTMLDivElement>) | (Omit<AccordionMultipleProps, 'asChild'> & RefAttributes<HTMLDivElement>);
19export declare function Accordion({ children, ...rest }: AccordionProps): JSX.Element;