@uifabric/experiments
Version:
Experimental React components for building experiences for Microsoft 365.
33 lines (32 loc) • 1.38 kB
TypeScript
import * as React from 'react';
import { ITheme, IStyle } from '@uifabric/styling';
export interface IFloatingSuggestionItemProps<T> {
item: T;
isSelected: boolean;
onClick?: (ev: React.MouseEvent<HTMLElement>, item: IFloatingSuggestionItemProps<T>) => void;
onRemoveItem?: (ev: React.MouseEvent<HTMLElement>, item: IFloatingSuggestionItemProps<T>) => void;
displayText?: string;
className?: string;
/**
* Takes precedence over showSuggestionRemoveButton
*/
showRemoveButton?: boolean;
ariaLabel?: string;
removeButtonAriaLabel?: string;
key?: string;
id?: string;
theme?: ITheme;
onRenderSuggestion?: (renderProps: IFloatingSuggestionOnRenderItemProps<T>) => JSX.Element;
}
export declare type IFloatingSuggestionItem<T> = Omit<IFloatingSuggestionItemProps<T>, 'onRenderSuggestion' | 'onClick' | 'onRemoveItem' | 'theme'>;
export declare type IFloatingSuggestionOnClickItemProps<T> = Pick<IFloatingSuggestionItemProps<T>, 'item' | 'isSelected' | 'key' | 'id'>;
export declare type IFloatingSuggestionOnRenderItemProps<T> = Omit<IFloatingSuggestionItemProps<T>, 'onRenderSuggestion'>;
export interface IFloatingSuggestionItemStylesProps {
isSelected?: boolean;
}
export interface IFloatingSuggestionItemStyles {
root: IStyle;
itemButton: IStyle;
closeButton: IStyle;
displayText: IStyle;
}