import React from 'react';
import PropTypes from 'prop-types';

import './spinner.scss';

const Spinner = ({ noLabel, className }) => (
  <div styleName="spinner" className={className}>
    {!noLabel && <span>Loading...</span>}
  </div>
);

Spinner.propTypes = {
  /** @ignore */
  className: PropTypes.string,
  noLabel: PropTypes.bool
};

Spinner.defaultProps = {
  className: null,
  noLabel: false
};

export default Spinner;
