@mskcc/carbon-react
Version:
Carbon react components for the MSKCC DSM
63 lines (62 loc) • 2.02 kB
TypeScript
/**
* MSKCC DSM 2021, 2023
*/
import PropTypes from 'prop-types';
import { PropsWithChildren } from 'react';
interface AccordionProps {
/**
* Specify the alignment of the accordion heading
* title and chevron. Defaults to `end`.
*/
align?: 'start' | 'end';
/**
* Specify an optional className to be applied to
* the container node.
*/
className?: string;
/**
* Specify whether an individual AccordionItem
* should be disabled.
*/
disabled?: boolean;
/**
* Specify whether Accordion text should be flush,
* default is `false`, does not work with `align="start"`.
*/
isFlush?: boolean;
/**
* Specify the size of the Accordion. Currently
* supports the following: `sm`, `md`, `lg`
*/
size?: 'sm' | 'md' | 'lg';
}
declare function Accordion({ align, children, className: customClassName, disabled, isFlush, size, ...rest }: PropsWithChildren<AccordionProps>): JSX.Element;
declare namespace Accordion {
var propTypes: {
/**
* Specify the alignment of the accordion heading title and chevron.
*/
align: PropTypes.Requireable<string>;
/**
* Pass in the children that will be rendered within the Accordion
*/
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/**
* Specify an optional className to be applied to the container node
*/
className: PropTypes.Requireable<string>;
/**
* Specify whether an individual AccordionItem should be disabled
*/
disabled: PropTypes.Requireable<boolean>;
/**
* Specify whether Accordion text should be flush, default is false, does not work with align="start"
*/
isFlush: PropTypes.Requireable<boolean>;
/**
* Specify the size of the Accordion. Currently supports the following:
*/
size: PropTypes.Requireable<string>;
};
}
export default Accordion;