waiting
Version:
A React component to tell the user they are waiting with a pulse animation :)
34 lines (28 loc) • 862 B
JavaScript
;
function _interopDefault (ex) { return 'default' in ex ? ex['default'] : ex; }
var React = _interopDefault(require('react'));
var animation = '@keyframes scaleout {\n 0% {\n transform: scale(0.0);\n -webkit-transform: scale(0.0);\n } 100% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n opacity: 0;\n }\n}';
var Waiting = function Waiting(props) {
var style = {
animation: 'scaleout 1.0s infinite linear',
backgroundColor: props.color,
borderRadius: props.size,
height: props.size,
WebkitAnimation: 'scaleout 1.0s infinite linear',
width: props.size
};
return React.createElement(
'div',
{ style: style },
React.createElement(
'style',
null,
animation
)
);
};
Waiting.defaultProps = {
color: '#323232',
size: 32
};
module.exports = Waiting;