UNPKG

@uifabric/experiments

Version:

Experimental React components for building experiences for Office 365.

37 lines 2.29 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { Button } from '@uifabric/experiments'; import { Spinner, Stack, Text } from 'office-ui-fabric-react'; import { stackProps } from './SlotExampleUtils'; // tslint:disable:jsx-no-lambda // tslint:disable:jsx-key var SlotsContentExample = /** @class */ (function (_super) { tslib_1.__extends(SlotsContentExample, _super); function SlotsContentExample() { return _super !== null && _super.apply(this, arguments) || this; } SlotsContentExample.prototype.render = function () { return (React.createElement(Stack, tslib_1.__assign({}, stackProps), React.createElement(Button, { content: 1 }, React.createElement("p", null, "Content: Integer")), React.createElement(Button, { content: "Content: String" }), React.createElement(Button, { content: { weight: 'bold', children: 'Content: Props, weight: bold' } }), React.createElement(Button, { content: function () { return React.createElement(Spinner, null); } }, React.createElement("p", null, "Content: Function, Spinner")), React.createElement(Button, { content: function (render) { return render(function (ContentType, contentProps) { return (React.createElement("b", null, "Content: ", React.createElement(ContentType, tslib_1.__assign({}, contentProps), "TextType"))); }); } }, React.createElement("p", null, "Content: Function, Text + ContentType")), React.createElement(Button, { content: { children: 'Content: Child String' } }), React.createElement(Button, { content: { children: ['Content: Child 1,', ' Child 2'] } }), React.createElement(Button, { content: React.createElement(Text, null, "Content: JSX Element") }), React.createElement(Button, { content: "Content: With Children" }, React.createElement("p", null, "Button Child 1"), React.createElement("p", null, "Button Child 2")))); }; return SlotsContentExample; }(React.Component)); export { SlotsContentExample }; //# sourceMappingURL=Slots.Content.Example.js.map