import PropTypes from 'prop-types'; import React from 'react'; import classNames from 'classnames'; import Box from '../box/box.jsx'; import styles from './connection-modal.css'; const Dots = props => (
{Array(props.total).fill(0) .map((_, i) => { let type = 'inactive'; if (props.counter === i) type = 'active'; if (props.success) type = 'success'; if (props.error) type = 'error'; return (); })}
); Dots.propTypes = { className: PropTypes.string, counter: PropTypes.number, error: PropTypes.bool, success: PropTypes.bool, total: PropTypes.number }; const Dot = props => (
); Dot.propTypes = { type: PropTypes.string }; export default Dots;