@massds/mayflower-react
Version:
React versions of Mayflower design system UI components
36 lines (35 loc) • 1.42 kB
TypeScript
/**
* AccordionItem module.
* @module @massds/mayflower-react/AccordionItem
* @requires module:@massds/mayflower-assets/scss/02-molecules/accordion-item
* @requires module:@massds/mayflower-assets/scss/01-atoms/svg-icons
* @requires module:@massds/mayflower-assets/scss/01-atoms/svg-loc-icons
*/
import React from 'react';
export interface AccordionItemProps {
/** The title of the accordion header */
title: string;
/** Accessible aria label */
info: string;
/** The icon to display in the collapsible header */
icon?: React.ReactElement;
/** Whether the accordion should have a border or not, default is true (border) */
border?: boolean;
/** Where the accordion header's background should remain colored when expanded */
emphasize?: boolean;
/** Content rendered in the collapsed section. Only Paragraph, Table, Heading, OrderedList
and UnorderList are valid children components to pass to AccordionItem */
children: React.ReactElement;
/** Whether to style the accordion as secondary or not. */
secondary?: boolean;
/** Heading level for accordion title */
headerLevel?: number;
/** Expand button id and section id, used for a11y */
id?: string;
}
declare class AccordionItem extends React.Component<AccordionItemProps> {
constructor(props: any);
handleClick(): void;
render(): any;
}
export default AccordionItem;