@smart-react-components/ui
Version:
SRC UI includes React and Styled components.
46 lines (41 loc) • 1.26 kB
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Div_1 = __importDefault(require("@smart-react-components/core/Element/Div"));
const styled_components_1 = __importDefault(require("styled-components"));
exports.default = (0, styled_components_1.default)(Div_1.default)(({ theme, hasAnimation }) => `
align-items: center;
display: flex;
height: 100%;
justify-content: center;
left: 0;
position: absolute;
width: 100%;
z-index: ${theme.$.zIndex.buttonLoading};
${hasAnimation
? `
&.src-button-loading-show {
opacity: 0;
transform: scale(0);
}
&.src-button-loading-show-active {
transition: 300ms 0s ease-in-out;
transition-property: opacity, transform;
opacity: 1;
transform: scale(1);
}
&.src-button-loading-hide {
opacity: 1;
transform: scale(1);
}
&.src-button-loading-hide-active {
transition: 300ms 0s ease-in-out;
transition-property: opacity, transform;
opacity: 0;
transform: scale(0);
}
`
: ''}
`);
;