UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

37 lines (35 loc) 2.93 kB
define(["require", "exports", "tslib", "react", "office-ui-fabric-react/lib/TextField", "office-ui-fabric-react/lib/Utilities"], function (require, exports, tslib_1, React, TextField_1, Utilities_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var TextFieldBasicExample = (function (_super) { tslib_1.__extends(TextFieldBasicExample, _super); function TextFieldBasicExample() { return _super !== null && _super.apply(this, arguments) || this; } TextFieldBasicExample.prototype.render = function () { return (React.createElement("div", null, React.createElement(TextField_1.TextField, { label: 'Default TextField', onChanged: this._onChanged }), React.createElement(TextField_1.TextField, { label: 'Disabled TextField', disabled: true, placeholder: 'Placeholder text' }), React.createElement(TextField_1.TextField, { label: 'Required TextField', required: true }), React.createElement(TextField_1.TextField, { label: 'TextField with a placeholder', placeholder: 'Now I am a Placeholder', ariaLabel: 'Please enter text here' }), React.createElement(TextField_1.TextField, { label: 'TextField with an icon', iconProps: { iconName: 'Calendar' } }), React.createElement(TextField_1.TextField, { label: 'Textfield with an addon', addonString: 'https://' }), React.createElement(TextField_1.TextField, { label: 'Multiline TextField', multiline: true, rows: 4, iconProps: { iconName: 'Calendar' } }), React.createElement(TextField_1.TextField, { label: 'Multiline TextField Unresizable', multiline: true, resizable: false }), React.createElement(TextField_1.TextField, { label: 'Multiline TextField with auto adjust height', multiline: true, autoAdjustHeight: true }), React.createElement(TextField_1.TextField, { label: 'Underlined TextField', underlined: true }), React.createElement(TextField_1.TextField, { label: 'Underlined TextField Disabled', underlined: true, disabled: true }), React.createElement(TextField_1.TextField, { label: 'Borderless TextField', borderless: true, placeholder: 'No borders here, folks.' }), React.createElement(TextField_1.TextField, { label: 'Multiline Borderless TextField', multiline: true, rows: 4, borderless: true, placeholder: 'Example TextField without a border' }))); }; TextFieldBasicExample.prototype._onChanged = function (text) { console.log(text); }; return TextFieldBasicExample; }(React.Component)); tslib_1.__decorate([ Utilities_1.autobind ], TextFieldBasicExample.prototype, "_onChanged", null); exports.TextFieldBasicExample = TextFieldBasicExample; }); //# sourceMappingURL=TextField.Basic.Example.js.map