import React, { PureComponent } from 'react';
import cx from 'classnames';

import Box from '../box';
import theme from './theme.css';

class LoadingBar extends PureComponent {
  render() {
    const classNames = cx(theme['loading-bar']);

    return (
      <Box data-teamleader-ui="loading-bar" className={classNames}>
        <Box className={theme['loading-bar-indicator']} />
      </Box>
    );
  }
}

export default LoadingBar;

import React, { PureComponent } from 'react';
import cx from 'classnames';
import PropTypes from 'prop-types';

import Box from '../box';
import theme from './theme.css';

class LoadingBar extends PureComponent {
  render() {
    const { className } = this.props;

    const classNames = cx(theme['loading-bar'], className);

    return (
      <Box data-teamleader-ui="loading-bar" className={classNames}>
        <Box className={theme['loading-bar-indicator']} />
      </Box>
    );
  }
}

LoadingBar.propTypes = {
  className: PropTypes.string,
};

export default LoadingBar;

Add className prop to support adding extra class names
Add className prop
to support adding extra class names
