UNPKG

986 BTypeScriptView Raw
1import PropTypes from 'prop-types';
2import React from 'react';
3export interface ListOptionProps<TDataItem> extends Omit<React.HTMLProps<HTMLDivElement>, 'onSelect'> {
4 dataItem: TDataItem;
5 focused?: boolean;
6 selected: boolean;
7 searchTerm?: string;
8 disabled?: boolean;
9 onSelect: (dataItem: TDataItem, event: React.MouseEvent) => void;
10 component?: React.ElementType | null;
11 children?: React.ReactNode;
12}
13declare function ListOption<TDataItem>({ className, children, dataItem, selected, disabled, onSelect, searchTerm: _, ...props }: ListOptionProps<TDataItem>): JSX.Element;
14declare namespace ListOption {
15 var propTypes: {
16 activeId: PropTypes.Requireable<string>;
17 dataItem: PropTypes.Requireable<any>;
18 selected: PropTypes.Validator<boolean>;
19 onSelect: PropTypes.Validator<(...args: any[]) => any>;
20 component: PropTypes.Requireable<any>;
21 };
22}
23export default ListOption;
24//# sourceMappingURL=ListOption.d.ts.map
\No newline at end of file