all files / src/components/ Loading.jsx

88.89% Statements 8/9
100% Branches 0/0
0% Functions 0/1
87.5% Lines 7/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29                                            
import React from 'react';
import PropTypes from 'prop-types';
 
const propTypes = {
  size: PropTypes.number,
};
const defaultProps = {
  size: 25,
};
 
export default function Loading(props) {
  return (
    <img
      className="loading"
      alt="Loading..."
      src="/static/assets/images/loading.gif"
      style={{
        width: props.size,
        height: props.size,
        padding: 0,
        margin: 0,
        position: 'absolute',
      }}
    />
  );
}
Loading.propTypes = propTypes;
Loading.defaultProps = defaultProps;