enchoice-fabric-react-lib
Version:
This project was created to integrate Microsoft Fabric React
40 lines (39 loc) • 1.38 kB
TypeScript
import { ITheme, IStyle } from 'office-ui-fabric-react/lib/Styling';
import { IStyleFunctionOrObject } from "office-ui-fabric-react/lib/Utilities";
import { IObjectWithKey } from "office-ui-fabric-react/lib/Selection";
import { IColumn } from 'office-ui-fabric-react/lib/DetailsList';
export interface ISearchBoxProps {
styles?: IStyleFunctionOrObject<ISearchBoxStyleProps, ISearchBoxStyles>;
theme?: ITheme;
className?: string;
onSearch: (newValue: any) => void;
onChange?: (newValue: any) => void;
onClear?: (ev?: any) => void;
onEscape?: (ev?: any) => void;
onFocus?: (ev?: any) => void;
onBlur?: (ev?: any) => void;
getGroupItems?: () => ISearchBoxGroupItems[];
onSelectionChanged?: (selection: IObjectWithKey[]) => any;
indentWidth?: number | undefined;
placeholder?: string;
underlined?: boolean;
value?: string;
groupItems?: ISearchBoxGroupItems[];
}
export interface ISearchBoxGroupItems {
key: string;
name: string;
items: ISearchBoxGroupItem[];
onItemClick: (item: ISearchBoxGroupItem) => void;
}
export interface ISearchBoxGroupItem {
onRenderColumns: (item: any) => IColumn[];
[x: string]: any;
}
export interface ISearchBoxStyleProps {
theme: ITheme;
className?: string;
}
export interface ISearchBoxStyles {
root?: IStyle;
}