UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

1 lines 2.59 kB
module.exports = "import * as React from 'react';\n\n/**\n * TextField component props.\n */\nexport interface ITextFieldProps extends React.HTMLProps<HTMLInputElement | HTMLTextAreaElement> {\n /**\n * Whether or not the textfield is a multiline textfield.\n * @default false\n */\n multiline?: boolean;\n\n /**\n * Whether or not the multiline textfield is resizable.\n * @default true\n */\n resizable?: boolean;\n\n /**\n * Whether or not the textfield is underlined.\n * @default false\n */\n underlined?: boolean;\n\n /**\n * Label for the textfield.\n */\n label?: string;\n\n /**\n * The textfield input description\n */\n description?: string;\n\n /**\n * CSS class for the icon.\n */\n iconClass?: string;\n\n /**\n * Default value of the textfield, if any. Only provide this if the textfield is an uncontrolled component;\n * otherwise, use the \"value\" property.\n */\n defaultValue?: string;\n\n /**\n * Current value of the textfield. Only provide this if the textfield is a controlled component where you\n * are maintaining its current state; otherwise, use the \"defaultValue\" property.\n */\n value?: string;\n\n /**\n * Disabled state of the textfield.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Default value of the textfield, if any.\n */\n errorMessage?: string;\n\n /**\n * Callback for the onChanged event.\n */\n onChanged?: (newValue: any) => void;\n\n /**\n * Callback for the onBeforeChange event.\n */\n onBeforeChange?: (newValue: any) => void;\n\n /**\n * Callback for the onNotifyValidationResult event.\n */\n onNotifyValidationResult?: (errorMessage: string, value: string) => void;\n\n /**\n * The method is used to get the validation error message and determine whether the input value is valid or not.\n *\n * When it returns string:\n * - If valid, it returns empty string.\n * - If invalid, it returns the error message string and the text field will\n * show a red border and show an error message below the text field.\n *\n * When it returns Promise<string>:\n * - The resolved value is display as error message.\n * - The rejected, the value is thrown away.\n *\n */\n onGetErrorMessage?: (value: string) => string | PromiseLike<string>;\n\n /**\n * Text field will start to validate after users stop typing for `deferredValidationTime` milliseconds.\n * @default 200\n */\n deferredValidationTime?: number;\n\n /**\n * Aria Label for textfield, if any.\n */\n ariaLabel?: string;\n}\n";