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

import style from './DigitBlock.sass';

const DigitBlock = ({ children, suffix }) => (
  <div className={style.digitBlock}>
    <span>{children}</span>
    <span className={style.digitBlockSuffix}>{suffix}</span>
  </div>
);

DigitBlock.defaultProps = {
  suffix: null,
};

DigitBlock.propTypes = {
  children: PropTypes.node.isRequired,
  suffix: PropTypes.string,
};

export default DigitBlock;
