lucid-ui
Version:
A UI component library from Xandr.
110 lines • 3.5 kB
TypeScript
import React from 'react';
import PropTypes from 'prop-types';
import { ExpanderPanelDumb as ExpanderPanel } from '../ExpanderPanel/ExpanderPanel';
import { StandardProps } from '../../util/component-types';
import * as reducers from '../Accordion/Accordion.reducers';
export interface IAccordionProps 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 interface IAccordionState {
selectedIndex: number | null;
}
declare const Accordion: {
(props: IAccordionProps): React.ReactElement;
displayName: string;
propTypes: {
/**
Appended to the component-specific class names set on the root element.
*/
className: PropTypes.Requireable<string>;
/**
Indicates which item is expanded
*/
selectedIndex: PropTypes.Requireable<number>;
/**
Called when the user clicks on the component's header of an item.
*/
onSelect: PropTypes.Requireable<(...args: any[]) => any>;
/**
Passed through to the root element.
**/
style: PropTypes.Requireable<object>;
};
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: PropTypes.Requireable<PropTypes.ReactNodeLike>;
};
};
};
declare const _default: {
(props: IAccordionProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
displayName: string;
propTypes: {
/**
Appended to the component-specific class names set on the root element.
*/
className: PropTypes.Requireable<string>;
/**
Indicates which item is expanded
*/
selectedIndex: PropTypes.Requireable<number>;
/**
Called when the user clicks on the component's header of an item.
*/
onSelect: PropTypes.Requireable<(...args: any[]) => any>;
/**
Passed through to the root element.
**/
style: PropTypes.Requireable<object>;
};
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: PropTypes.Requireable<PropTypes.ReactNodeLike>;
};
};
} & import("../../util/state-management").IHybridComponent<IAccordionProps, IAccordionState>;
export default _default;
export { Accordion as AccordionDumb };
//# sourceMappingURL=Accordion.d.ts.map