@dnanpm/styleguide
Version:
DNA Styleguide repository provides the set of components and theme object used in various DNA projects.
41 lines (40 loc) • 956 B
TypeScript
import type { MouseEvent, ReactNode } from 'react';
import React from 'react';
interface Props {
/**
* Unique ID for the component
*/
id?: string;
/**
* Allows to expand or collapse the component
*
* @default false
*/
isExpanded?: boolean;
/**
* Allows to change label of ButtonIcon
*/
buttonLabel: string;
/**
* Allows to change label of ButtonClose
*/
closeButtonLabel?: string;
/**
* Content of Expander component
*/
children?: ReactNode;
/**
* On ButtonIcon mouse click callback
*/
onClick?: (e: MouseEvent<HTMLElement>) => void;
/**
* Allows to pass a custom className
*/
className?: string;
/**
* Allows to pass testid string for testing purposes
*/
'data-testid'?: string;
}
declare const Expander: ({ "data-testid": dataTestId, ...props }: Props) => React.JSX.Element;
export default Expander;