UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

27 lines 1.36 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { TextField } from 'office-ui-fabric-react/lib/TextField'; import './TextField.Examples.scss'; var TextFieldOnRenderDescriptionExample = /** @class */ (function (_super) { tslib_1.__extends(TextFieldOnRenderDescriptionExample, _super); function TextFieldOnRenderDescriptionExample() { var _this = _super !== null && _super.apply(this, arguments) || this; _this._onRenderDescription = function (props) { return (React.createElement("div", null, props.description, ' ', React.createElement("a", { href: "#", onClick: _this._onLinkClick }, "Link"))); }; _this._onLinkClick = function (e) { e.preventDefault(); }; return _this; } TextFieldOnRenderDescriptionExample.prototype.render = function () { return (React.createElement("div", { className: "docs-TextFieldExample" }, React.createElement(TextField, { description: 'A custom description that appends a link.', onRenderDescription: this._onRenderDescription }))); }; return TextFieldOnRenderDescriptionExample; }(React.Component)); export { TextFieldOnRenderDescriptionExample }; //# sourceMappingURL=TextField.OnRenderDescription.Example.js.map