spartan-ui
Version:
React component library that focusses on getting the basics right leaving the design up to you
16 lines (15 loc) • 494 B
TypeScript
import { FunctionComponent, ReactNode } from 'react';
import { CommonProps } from '../../types';
interface RenderProps {
open: boolean;
headingProps: object;
bodyProps: object;
}
interface AccordionProps extends CommonProps {
children: (props: RenderProps) => ReactNode;
id: string;
open: boolean;
onClick: (e: MouseEvent | KeyboardEvent, open: boolean) => void;
}
declare const Accordion: FunctionComponent<AccordionProps>;
export default Accordion;