UNPKG

@uifabric/experiments

Version:

Experimental React components for building experiences for Office 365.

29 lines 1.48 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { Button } from '@uifabric/experiments'; import { Spinner, Stack } from 'office-ui-fabric-react'; import { stackProps } from './SlotExampleUtils'; // tslint:disable:jsx-no-lambda var SlotsExample = /** @class */ (function (_super) { tslib_1.__extends(SlotsExample, _super); function SlotsExample() { return _super !== null && _super.apply(this, arguments) || this; } SlotsExample.prototype.render = function () { return (React.createElement(Stack, tslib_1.__assign({}, stackProps, { maxWidth: 400 }), React.createElement(Button // Render function usage , { // Render function usage root: function (render) { return render(function (RootType, rootProps) { return React.createElement(RootType, tslib_1.__assign({}, rootProps)); }); }, // Subcomponent props usage stack: { styles: { root: { background: 'lightblue' } } }, // Shorthand prop usage icon: "share", // Render function usage content: function (render) { return render(function (ComponentType, props) { return React.createElement(Spinner, null); }); } }, "Just a button with a spinner as its content."))); }; return SlotsExample; }(React.Component)); export { SlotsExample }; //# sourceMappingURL=Slots.Example.js.map