wix-style-react
Version:
wix-style-react
54 lines • 2.46 kB
TypeScript
export default SelectableAccordion;
/** SelectableAccordion */
declare class SelectableAccordion extends React.PureComponent<any, any, any> {
static propTypes: {
/** Applied as data-hook HTML attribute that can be used in the tests */
dataHook: PropTypes.Requireable<string>;
/** A css class to be applied to the component's root element */
className: PropTypes.Requireable<string>;
/** A type can be ether radio, checkbox, or toggle, which will effect the way an accordion item is selected */
type: PropTypes.Requireable<string>;
/** An array of Accordion items:
* - `title`: A title of the item
* - `subtitle`: An optional second row of the header
* - `content`: A content of the item
* - `initiallyOpen`: Whether the item is initially open
* - `open`: Whether the item is open
* - `disabled`: Whether the item is disabled
* - `onClick`: A callback which is invoked when item's selection is changed
* */
items: PropTypes.Requireable<(PropTypes.InferProps<{
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
subtitle: PropTypes.Requireable<PropTypes.ReactNodeLike>;
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
initiallyOpen: PropTypes.Requireable<boolean>;
open: PropTypes.Requireable<boolean>;
disabled: PropTypes.Requireable<boolean>;
onClick: PropTypes.Requireable<(...args: any[]) => any>;
}> | null | undefined)[]>;
/** Extra space on top and bottom of selectable accordion item */
verticalPadding: PropTypes.Requireable<string>;
/** A callback which is invoked every time the selection is changed */
onSelectionChanged: PropTypes.Requireable<(...args: any[]) => any>;
};
static defaultProps: {
type: string;
items: never[];
verticalPadding: string;
};
static displayName: string;
static getDerivedStateFromProps({ items }: {
items: any;
}, state: any): any;
constructor(props: any);
constructor(props: any, context: any);
state: {
openIndices: any;
};
_populateInitiallyOpenIndices(): any;
_onItemChanged: (idx: any, open: any) => void;
render(): React.JSX.Element;
}
import React from 'react';
import PropTypes from 'prop-types';
//# sourceMappingURL=SelectableAccordion.d.ts.map