import classes from './style.module.scss';

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

// Components
import { Title, Flex } from '@ui/components';

const DashHeader = props => {
  const { icon, title, children } = props;
  return (
    <div className={classes.DashHeader}>
      <Flex className={classes['DashHeader-Inner']}>
        <Title className={classes['DashHeader-Title']}>
          <i className={[icon, classes['DashHeader-Title-Icon']].join(' ')}></i>
          {title}
        </Title>
        <div className={classes['DashHeader-Children']}>{children}</div>
      </Flex>
    </div>
  );
};

DashHeader.propTypes = {
  children: PropTypes.any,
  icon: PropTypes.string,
  title: PropTypes.string,
};

export default DashHeader;
