UNPKG

@uifabric/experiments

Version:

Experimental React components for building experiences for Office 365.

58 lines 3.76 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { Shimmer, ShimmerElementType as ElemType, ShimmerElementVerticalAlign as ElemVerticalAlign } from '@uifabric/experiments/lib/Shimmer'; import './Shimmer.Example.scss'; var ShimmerBasicExample = /** @class */ (function (_super) { tslib_1.__extends(ShimmerBasicExample, _super); function ShimmerBasicExample(props) { return _super.call(this, props) || this; } ShimmerBasicExample.prototype.render = function () { return (React.createElement("div", { className: "shimmerBasicExample-container" }, "Basic Shimmer with no elements provided. It defaults to a line of 16px height.", React.createElement(Shimmer, null), React.createElement(Shimmer, { widthInPercentage: 75 }), React.createElement(Shimmer, { widthInPercentage: 50 }), "Basic Shimmer with elements provided.", React.createElement(Shimmer, { shimmerElements: [{ type: ElemType.circle }, { type: ElemType.gap, widthInPercentage: 2 }, { type: ElemType.line }] }), React.createElement(Shimmer, { shimmerElements: [ { type: ElemType.circle, height: 24 }, { type: ElemType.gap, widthInPercentage: 2 }, { type: ElemType.line, height: 16, widthInPercentage: 20 }, { type: ElemType.gap, widthInPercentage: 5 }, { type: ElemType.line, height: 16, widthInPercentage: 20 }, { type: ElemType.gap, widthInPercentage: 10 }, { type: ElemType.line, height: 16, widthInPercentage: 15 }, { type: ElemType.gap, widthInPercentage: 10 }, { type: ElemType.line, height: 16 } ] }), React.createElement(Shimmer, { widthInPercentage: 70, shimmerElements: [ { type: ElemType.circle, height: 24 }, { type: ElemType.gap, widthInPercentage: 2 }, { type: ElemType.line, height: 16, widthInPercentage: 20 }, { type: ElemType.gap, widthInPercentage: 5 }, { type: ElemType.line, height: 16, widthInPercentage: 20 }, { type: ElemType.gap, widthInPercentage: 10 }, { type: ElemType.line, height: 16, widthInPercentage: 15 }, { type: ElemType.gap, widthInPercentage: 10 }, { type: ElemType.line, height: 16 } ] }), "Variations of vertical alignment for Circles and Lines.", React.createElement(Shimmer, { shimmerElements: [ { type: ElemType.circle }, { type: ElemType.gap, widthInPercentage: 2 }, { type: ElemType.circle, height: 15, verticalAlign: ElemVerticalAlign.top }, { type: ElemType.gap, widthInPercentage: 2 }, { type: ElemType.line, verticalAlign: ElemVerticalAlign.bottom, widthInPercentage: 20 }, { type: ElemType.gap, widthInPercentage: 2 }, { type: ElemType.line, height: 5, verticalAlign: ElemVerticalAlign.top, widthInPercentage: 20 }, { type: ElemType.gap, widthInPercentage: 2 }, { type: ElemType.line, height: 16, widthInPercentage: 15 }, { type: ElemType.gap, widthInPercentage: 2 }, { type: ElemType.line, height: 10, verticalAlign: ElemVerticalAlign.bottom } ] }))); }; return ShimmerBasicExample; }(React.Component)); export { ShimmerBasicExample }; //# sourceMappingURL=Shimmer.Basic.Example.js.map