lucid-ui
Version:
A UI component library from AppNexus.
86 lines (85 loc) • 2.68 kB
TypeScript
import React from 'react';
import { ExpanderPanelDumb as ExpanderPanel } from '../ExpanderPanel/ExpanderPanel';
import { StandardProps, Overwrite } from '../../util/component-types';
import * as reducers from '../Accordion/Accordion.reducers';
interface IAccordionPropsRaw extends StandardProps {
/**
* Indicates which item is expanded
* */
selectedIndex?: number | null;
/**
* Called when the user clicks on the component's header of an item.
* */
onSelect: (selectedIndex: number | null, { event, props }: {
event: React.MouseEvent;
props: IAccordionProps;
}) => void;
}
export declare type IAccordionProps = Overwrite<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IAccordionPropsRaw>;
export interface IAccordionState {
selectedIndex: number | null;
}
declare const Accordion: {
(props: IAccordionProps): JSX.Element;
displayName: string;
propTypes: {
className: any;
selectedIndex: any;
onSelect: any;
style: any;
};
peek: {
description: string;
categories: string[];
madeFrom: string[];
};
defaultProps: {
onSelect: (...args: any[]) => void;
};
reducers: typeof reducers;
Item: typeof ExpanderPanel;
Header: {
(_props: import("../ExpanderPanel/ExpanderPanel").IExpanderPanelHeaderProps): null;
displayName: string;
peek: {
description: string;
};
propName: string;
propTypes: {
children: any;
};
};
};
declare const _default: {
(props: Overwrite<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IAccordionPropsRaw>): JSX.Element;
displayName: string;
propTypes: {
className: any;
selectedIndex: any;
onSelect: any;
style: any;
};
peek: {
description: string;
categories: string[];
madeFrom: string[];
};
defaultProps: {
onSelect: (...args: any[]) => void;
};
reducers: typeof reducers;
Item: typeof ExpanderPanel;
Header: {
(_props: import("../ExpanderPanel/ExpanderPanel").IExpanderPanelHeaderProps): null;
displayName: string;
peek: {
description: string;
};
propName: string;
propTypes: {
children: any;
};
};
} & import("../../util/state-management").IHybridComponent<Overwrite<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IAccordionPropsRaw>, IAccordionState>;
export default _default;
export { Accordion as AccordionDumb };