@uifabric/experiments
Version:
Experimental React components for building experiences for Office 365.
58 lines • 4.8 kB
JavaScript
define(["require", "exports", "tslib", "react", "@uifabric/experiments/lib/Shimmer", "./Shimmer.Example.scss"], function (require, exports, tslib_1, React, Shimmer_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
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_1.Shimmer, null),
React.createElement(Shimmer_1.Shimmer, { widthInPercentage: 75 }),
React.createElement(Shimmer_1.Shimmer, { widthInPercentage: 50 }),
"Basic Shimmer with elements provided.",
React.createElement(Shimmer_1.Shimmer, { shimmerElements: [{ type: Shimmer_1.ShimmerElementType.circle }, { type: Shimmer_1.ShimmerElementType.gap, widthInPercentage: 2 }, { type: Shimmer_1.ShimmerElementType.line }] }),
React.createElement(Shimmer_1.Shimmer, { shimmerElements: [
{ type: Shimmer_1.ShimmerElementType.circle, height: 24 },
{ type: Shimmer_1.ShimmerElementType.gap, widthInPercentage: 2 },
{ type: Shimmer_1.ShimmerElementType.line, height: 16, widthInPercentage: 20 },
{ type: Shimmer_1.ShimmerElementType.gap, widthInPercentage: 5 },
{ type: Shimmer_1.ShimmerElementType.line, height: 16, widthInPercentage: 20 },
{ type: Shimmer_1.ShimmerElementType.gap, widthInPercentage: 10 },
{ type: Shimmer_1.ShimmerElementType.line, height: 16, widthInPercentage: 15 },
{ type: Shimmer_1.ShimmerElementType.gap, widthInPercentage: 10 },
{ type: Shimmer_1.ShimmerElementType.line, height: 16 }
] }),
React.createElement(Shimmer_1.Shimmer, { widthInPercentage: 70, shimmerElements: [
{ type: Shimmer_1.ShimmerElementType.circle, height: 24 },
{ type: Shimmer_1.ShimmerElementType.gap, widthInPercentage: 2 },
{ type: Shimmer_1.ShimmerElementType.line, height: 16, widthInPercentage: 20 },
{ type: Shimmer_1.ShimmerElementType.gap, widthInPercentage: 5 },
{ type: Shimmer_1.ShimmerElementType.line, height: 16, widthInPercentage: 20 },
{ type: Shimmer_1.ShimmerElementType.gap, widthInPercentage: 10 },
{ type: Shimmer_1.ShimmerElementType.line, height: 16, widthInPercentage: 15 },
{ type: Shimmer_1.ShimmerElementType.gap, widthInPercentage: 10 },
{ type: Shimmer_1.ShimmerElementType.line, height: 16 }
] }),
"Variations of vertical alignment for Circles and Lines.",
React.createElement(Shimmer_1.Shimmer, { shimmerElements: [
{ type: Shimmer_1.ShimmerElementType.circle },
{ type: Shimmer_1.ShimmerElementType.gap, widthInPercentage: 2 },
{ type: Shimmer_1.ShimmerElementType.circle, height: 15, verticalAlign: Shimmer_1.ShimmerElementVerticalAlign.top },
{ type: Shimmer_1.ShimmerElementType.gap, widthInPercentage: 2 },
{ type: Shimmer_1.ShimmerElementType.line, verticalAlign: Shimmer_1.ShimmerElementVerticalAlign.bottom, widthInPercentage: 20 },
{ type: Shimmer_1.ShimmerElementType.gap, widthInPercentage: 2 },
{ type: Shimmer_1.ShimmerElementType.line, height: 5, verticalAlign: Shimmer_1.ShimmerElementVerticalAlign.top, widthInPercentage: 20 },
{ type: Shimmer_1.ShimmerElementType.gap, widthInPercentage: 2 },
{ type: Shimmer_1.ShimmerElementType.line, height: 16, widthInPercentage: 15 },
{ type: Shimmer_1.ShimmerElementType.gap, widthInPercentage: 2 },
{ type: Shimmer_1.ShimmerElementType.line, height: 10, verticalAlign: Shimmer_1.ShimmerElementVerticalAlign.bottom }
] })));
};
return ShimmerBasicExample;
}(React.Component));
exports.ShimmerBasicExample = ShimmerBasicExample;
});
//# sourceMappingURL=Shimmer.Basic.Example.js.map