@uifabric/experiments
Version:
Experimental React components for building experiences for Office 365.
26 lines • 1.5 kB
JavaScript
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 SlotsIconExample = /** @class */ (function (_super) {
tslib_1.__extends(SlotsIconExample, _super);
function SlotsIconExample() {
return _super !== null && _super.apply(this, arguments) || this;
}
SlotsIconExample.prototype.render = function () {
return (React.createElement(Stack, tslib_1.__assign({}, stackProps),
React.createElement(Button, { icon: "share", content: "Icon: String" }),
React.createElement(Button, { icon: { iconName: 'share' }, content: "Icon: Props, iconName: 'share'" }),
React.createElement(Button, { icon: function (render) {
return render(function (IconType, iconProps) { return (React.createElement("b", null,
"Icon: ",
React.createElement(IconType, tslib_1.__assign({}, iconProps, { iconName: "upload" })))); });
}, content: "Icon: Function, Text + Icon" }),
React.createElement(Button, { icon: function () { return React.createElement(Spinner, null); }, content: "Icon: Function, Spinner" })));
};
return SlotsIconExample;
}(React.Component));
export { SlotsIconExample };
//# sourceMappingURL=Slots.Icon.Example.js.map