UNPKG

@gdjiami/jm-mrc-components

Version:

移动端可复用组件库

24 lines (23 loc) 2.35 kB
import { __extends, __makeTemplateObject } from "tslib"; import React, { PureComponent } from 'react'; import styled from 'styled-components'; import './style/index.css'; var SpinnerDiv = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 30px;\n"], ["\n width: 30px;\n"]))); var Item = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: #d20000;\n height: 100%;\n width: 2px;\n margin: 2px;\n display: inline-block;\n border-radius: 12px;\n -webkit-animation: stretchdelay 1.2s infinite ease-in-out;\n animation: stretchdelay 1.2s infinite ease-in-out;\n\n &.rect2 {\n -webkit-animation-delay: -1.1s;\n animation-delay: -1.1s;\n }\n\n &.rect3 {\n -webkit-animation-delay: -1s;\n animation-delay: -1s;\n }\n\n &.rect4 {\n -webkit-animation-delay: -0.9s;\n animation-delay: -0.9s;\n }\n\n &.rect5 {\n -webkit-animation-delay: -0.8s;\n animation-delay: -0.8s;\n }\n"], ["\n background-color: #d20000;\n height: 100%;\n width: 2px;\n margin: 2px;\n display: inline-block;\n border-radius: 12px;\n -webkit-animation: stretchdelay 1.2s infinite ease-in-out;\n animation: stretchdelay 1.2s infinite ease-in-out;\n\n &.rect2 {\n -webkit-animation-delay: -1.1s;\n animation-delay: -1.1s;\n }\n\n &.rect3 {\n -webkit-animation-delay: -1s;\n animation-delay: -1s;\n }\n\n &.rect4 {\n -webkit-animation-delay: -0.9s;\n animation-delay: -0.9s;\n }\n\n &.rect5 {\n -webkit-animation-delay: -0.8s;\n animation-delay: -0.8s;\n }\n"]))); var Loading = /** @class */ (function (_super) { __extends(Loading, _super); function Loading() { return _super !== null && _super.apply(this, arguments) || this; } Loading.prototype.render = function () { return (React.createElement(SpinnerDiv, { className: this.props.className }, React.createElement(Item, { className: "rect1" }), React.createElement(Item, { className: "rect2" }), React.createElement(Item, { className: "rect3" }), React.createElement(Item, { className: "rect4" }), React.createElement(Item, { className: "rect5" }))); }; return Loading; }(PureComponent)); export default Loading; var templateObject_1, templateObject_2;