office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
58 lines • 3.46 kB
JavaScript
import * as tslib_1 from "tslib";
import * as React from 'react';
import { Shimmer, ShimmerElementType as ElemType } from 'office-ui-fabric-react/lib/Shimmer';
import * as ShimmerExampleStyles from './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: ShimmerExampleStyles.shimmerExampleContainer },
"Basic Shimmer with no elements provided. It defaults to a line of 16px height.",
React.createElement(Shimmer, null),
React.createElement(Shimmer, { width: '75%' }),
React.createElement(Shimmer, { width: '50%' }),
"Basic Shimmer with elements provided.",
React.createElement(Shimmer, { shimmerElements: [{ type: ElemType.circle }, { type: ElemType.gap, width: '2%' }, { type: ElemType.line }] }),
React.createElement(Shimmer, { shimmerElements: [
{ type: ElemType.circle, height: 24 },
{ type: ElemType.gap, width: '2%' },
{ type: ElemType.line, height: 16, width: '20%' },
{ type: ElemType.gap, width: '5%' },
{ type: ElemType.line, height: 16, width: '20%' },
{ type: ElemType.gap, width: '10%' },
{ type: ElemType.line, height: 16, width: '15%' },
{ type: ElemType.gap, width: '10%' },
{ type: ElemType.line, height: 16 }
] }),
React.createElement(Shimmer, { width: '70%', shimmerElements: [
{ type: ElemType.circle, height: 24 },
{ type: ElemType.gap, width: '2%' },
{ type: ElemType.line, height: 16, width: '20%' },
{ type: ElemType.gap, width: '5%' },
{ type: ElemType.line, height: 16, width: '20%' },
{ type: ElemType.gap, width: '10%' },
{ type: ElemType.line, height: 16, width: '15%' },
{ type: ElemType.gap, width: '10%' },
{ type: ElemType.line, height: 16 }
] }),
"Variations of vertical alignment for Circles and Lines.",
React.createElement(Shimmer, { shimmerElements: [
{ type: ElemType.circle },
{ type: ElemType.gap, width: '2%' },
{ type: ElemType.circle, height: 15, verticalAlign: 'top' },
{ type: ElemType.gap, width: '2%' },
{ type: ElemType.line, verticalAlign: 'bottom', width: '20%' },
{ type: ElemType.gap, width: '2%' },
{ type: ElemType.line, height: 5, verticalAlign: 'top', width: '20%' },
{ type: ElemType.gap, width: '2%' },
{ type: ElemType.line, height: 16, width: '15%' },
{ type: ElemType.gap, width: '2%' },
{ type: ElemType.line, height: 10, verticalAlign: 'bottom' }
] })));
};
return ShimmerBasicExample;
}(React.Component));
export { ShimmerBasicExample };
//# sourceMappingURL=Shimmer.Basic.Example.js.map