UNPKG

@uifabric/experiments

Version:

Experimental React components for building experiences for Office 365.

39 lines 2.49 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { Stack, Text } from 'office-ui-fabric-react'; import { PersonaTestImages } from '@uifabric/experiments/lib/common/TestImages'; import { PersonaCoin } from '../index'; var sectionGap = 32; var headingGap = 16; var personaCoinGap = 12; var PersonaCoinStack = function (props) { return (React.createElement(Stack, { horizontal: true, disableShrink: true, gap: personaCoinGap }, props.children)); }; var PersonaCoinExample = /** @class */ (function (_super) { tslib_1.__extends(PersonaCoinExample, _super); function PersonaCoinExample() { return _super !== null && _super.apply(this, arguments) || this; } PersonaCoinExample.prototype.render = function () { return (React.createElement(Stack, { gap: sectionGap }, React.createElement(Stack, { gap: headingGap, padding: 8 }, React.createElement(Stack, { gap: personaCoinGap }, React.createElement(Text, null, "When passing text initials will be extracted from the text"), React.createElement(PersonaCoinStack, null, React.createElement(PersonaCoin, { text: "Kevin Jameson" }), React.createElement(PersonaCoin, { text: "\u738B\u529B" }), React.createElement(PersonaCoin, { text: "Eline Page", presence: 4 }), React.createElement(PersonaCoin, { text: "Eline Page", imageUrl: PersonaTestImages.personFemale }), React.createElement(PersonaCoin, { text: "Kevin Jameson", imageUrl: PersonaTestImages.personMale }))), React.createElement(Stack, { gap: personaCoinGap }, React.createElement(Text, null, "When passing specific initials"), React.createElement(PersonaCoinStack, null, React.createElement(PersonaCoin, { initials: "JB" }), React.createElement(PersonaCoin, { initials: "\u738B\u529B" }))), React.createElement(Stack, { gap: personaCoinGap }, React.createElement(Text, null, "Initials not available"), React.createElement(PersonaCoinStack, null, React.createElement(PersonaCoin, null)))))); }; return PersonaCoinExample; }(React.Component)); export { PersonaCoinExample }; //# sourceMappingURL=PersonaCoin.Example.js.map