UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

1 lines 2.35 kB
define([], function() { return "import * as React from 'react';\r\nimport { ISuggestionModel } from './SuggestionsController';\r\nimport { IRenderFunction } from '../../../common/IRenderFunction';\r\n\r\nexport interface ISuggestionsProps<T> extends React.Props<any> {\r\n /**\r\n * How the suggestion should look in the suggestion list.\r\n */\r\n onRenderSuggestion: (props: any) => JSX.Element;\r\n /**\r\n * What should occur when a suggestion is clicked\r\n */\r\n onSuggestionClick: (ev?: React.MouseEvent<HTMLElement>, item?: any, index?: number) => void;\r\n /**\r\n * The list of Suggestions that will be displayed\r\n */\r\n suggestions: ISuggestionModel<T>[];\r\n /**\r\n * How the \"no result found\" should look in the suggestion list.\r\n */\r\n onRenderNoResultFound?: IRenderFunction<void>;\r\n /**\r\n * The text that appears at the top of the suggestions list.\r\n */\r\n suggestionsHeaderText?: string;\r\n /**\r\n * The text that appears indicating to the user that they can search for more results.\r\n */\r\n searchForMoreText?: string;\r\n /**\r\n * The callback that should be called when the user attempts to get more results\r\n */\r\n onGetMoreResults?: () => void;\r\n /**\r\n * The CSS classname of the suggestions list.\r\n */\r\n className?: string;\r\n /**\r\n * The text that should appear if there is a search error.\r\n */\r\n searchErrorText?: string;\r\n /**\r\n * The text that should appear if no results are found when searching.\r\n */\r\n noResultsFoundText?: string;\r\n /**\r\n * the classname of the suggestionitem.\r\n */\r\n suggestionsItemClassName?: string;\r\n /**\r\n * Used to indicate whether or not the user can request more suggestions.\r\n * Dictates whether or not the searchForMore button is displayed.\r\n */\r\n moreSuggestionsAvailable?: boolean;\r\n /**\r\n * Used to indicate whether or not the suggestions are loading.\r\n */\r\n isLoading?: boolean;\r\n /**\r\n * The text to display while the results are loading.\r\n */\r\n loadingText?: string;\r\n}\r\n\r\nexport interface ISuggestionItemProps<T> {\r\n suggestionModel: ISuggestionModel<T>;\r\n RenderSuggestion: (item: any) => JSX.Element;\r\n onClick: (ev: React.MouseEvent<HTMLButtonElement>) => void;\r\n className?: string;\r\n}"; });