UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

40 lines (38 loc) 1.81 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var React = require("react"); var Utilities_1 = require("office-ui-fabric-react/lib/Utilities"); var Persona_1 = require("office-ui-fabric-react/lib/Persona"); var Icon_1 = require("office-ui-fabric-react/lib/Icon"); require("./PersonaExample.scss"); var TestImages_1 = require("../../../common/TestImages"); var examplePersona = { imageUrl: TestImages_1.TestImages.personaFemale, imageInitials: 'AL', primaryText: 'Annie Lindqvist', secondaryText: 'Software Engineer', tertiaryText: 'In a meeting', optionalText: 'Available at 4:00pm' }; var PersonaCustomRenderExample = (function (_super) { tslib_1.__extends(PersonaCustomRenderExample, _super); function PersonaCustomRenderExample() { return _super.call(this) || this; } PersonaCustomRenderExample.prototype.render = function () { return (React.createElement("div", null, React.createElement(Persona_1.Persona, tslib_1.__assign({}, examplePersona, { size: Persona_1.PersonaSize.large, presence: Persona_1.PersonaPresence.offline, onRenderSecondaryText: this._onRenderSecondaryText })))); }; PersonaCustomRenderExample.prototype._onRenderSecondaryText = function (props) { return (React.createElement("div", null, React.createElement(Icon_1.Icon, { iconName: 'Suitcase', className: 'ms-JobIconExample' }), props.secondaryText)); }; return PersonaCustomRenderExample; }(React.Component)); tslib_1.__decorate([ Utilities_1.autobind ], PersonaCustomRenderExample.prototype, "_onRenderSecondaryText", null); exports.PersonaCustomRenderExample = PersonaCustomRenderExample; //# sourceMappingURL=Persona.CustomRender.Example.js.map