lucid-ui
Version:
A UI component library from AppNexus.
69 lines (68 loc) • 2.34 kB
TypeScript
import React from 'react';
import { StandardProps } from '../../util/component-types';
import { IExpanderState } from '../Expander/Expander';
export interface IExpanderPanelHeaderProps extends StandardProps {
description?: string;
}
export interface IExpanderPanelProps extends StandardProps {
/** Indicates that the component is in the "expanded" state when true and in
the "unexpanded" state when false. */
isExpanded: boolean;
/** Indicates that the component is in the "disabled" state when true and in
the "enabled" state when false. */
isDisabled: boolean;
/** Controls the presence of padding on the inner content. */
hasPadding: boolean;
onRest?: () => void;
onRestAppliedOnCollapse?: boolean;
/** Called when the user clicks on the component's header. */
onToggle: (isExpanded: boolean, { event, props, }: {
event: React.MouseEvent;
props: IExpanderPanelProps;
}) => void;
/** prop alternative to Header child component passed through to the
underlying ExpanderPanel */
Header?: React.ReactNode;
}
declare class ExpanderPanel extends React.Component<IExpanderPanelProps, IExpanderState> {
static displayName: string;
static Header: {
(_props: IExpanderPanelHeaderProps): null;
displayName: string;
peek: {
description: string;
};
propName: string;
propTypes: {
children: any;
};
};
static propTypes: {
children: any;
className: any;
isExpanded: any;
isDisabled: any;
hasPadding: any;
onToggle: any;
style: any;
onRest: any;
onRestAppliedOnCollapse: any;
Header: any;
};
static peek: {
description: string;
categories: string[];
madeFrom: string[];
};
static defaultProps: {
isExpanded: boolean;
onToggle: (...args: any[]) => void;
hasPadding: boolean;
isDisabled: boolean;
};
handleToggle: (event: React.MouseEvent) => void;
render(): JSX.Element;
}
declare const _default: typeof ExpanderPanel & import("../../util/state-management").IHybridComponent<IExpanderPanelProps, IExpanderState>;
export default _default;
export { ExpanderPanel as ExpanderPanelDumb };