UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

33 lines 1.94 kB
define(["require", "exports", "tslib", "react", "office-ui-fabric-react/lib/Utilities", "office-ui-fabric-react/lib/Persona", "office-ui-fabric-react/lib/Icon", "../../../common/TestImages", "./PersonaExample.scss"], function (require, exports, tslib_1, React, Utilities_1, Persona_1, Icon_1, TestImages_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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)); }; tslib_1.__decorate([ Utilities_1.autobind ], PersonaCustomRenderExample.prototype, "_onRenderSecondaryText", null); return PersonaCustomRenderExample; }(React.Component)); exports.PersonaCustomRenderExample = PersonaCustomRenderExample; }); //# sourceMappingURL=Persona.CustomRender.Example.js.map