@retailmenot/anchor
Version:
A React UI Library by RetailMeNot
28 lines (27 loc) • 1.26 kB
TypeScript
import * as React from 'react';
import { CollapseVariants } from '../Collapse.component';
interface CollapseGroupProps extends React.HTMLAttributes<HTMLDivElement> {
/**
* Whether or not the CollapseGroup acts as an accordion, i.e. only one
* Collapse child can be open at a time.
*/
accordion?: boolean;
/** A zero-based index to indicate which Collapse child should be open first. Default is 0. */
openIndex?: number;
/** By passing a variant to the group, all Collapse children take on that variant */
variant?: CollapseVariants;
/** By passing an openedIcon to the group, all Collapse children use that openedIcon */
openedIcon?: React.ReactElement;
/** By passing a closedIcon to the group, all Collapse children use that closedIcon */
closedIcon?: React.ReactElement;
/** By passing removeInactive to the group, all Collapse children will receive that prop */
removeInactive?: boolean;
/**
* Realistically anything can be a child of CollapseGroup, but it's rather
* pointless as it's intended to have Collapse components as children
*/
children?: any;
className?: string;
}
export declare const CollapseGroup: React.FunctionComponent<CollapseGroupProps>;
export {};