2020-10-10 20:04:07 +02:00
|
|
|
import React from 'react';
|
2021-02-16 12:50:27 +01:00
|
|
|
import PropTypes from 'prop-types';
|
2020-10-10 20:04:07 +02:00
|
|
|
import classNames from 'classnames';
|
|
|
|
import styles from './Dot.module.css';
|
|
|
|
|
2021-02-16 12:50:27 +01:00
|
|
|
function Dot({ color, size, className }) {
|
2020-10-10 20:04:07 +02:00
|
|
|
return (
|
2020-10-15 07:09:00 +02:00
|
|
|
<div className={styles.wrapper}>
|
|
|
|
<div
|
|
|
|
style={{ background: color }}
|
|
|
|
className={classNames(styles.dot, className, {
|
|
|
|
[styles.small]: size === 'small',
|
|
|
|
[styles.large]: size === 'large',
|
|
|
|
})}
|
|
|
|
/>
|
|
|
|
</div>
|
2020-10-10 20:04:07 +02:00
|
|
|
);
|
|
|
|
}
|
2021-02-16 12:50:27 +01:00
|
|
|
|
|
|
|
Dot.propTypes = {
|
|
|
|
color: PropTypes.string,
|
|
|
|
size: PropTypes.oneOf(['small', 'large']),
|
|
|
|
className: PropTypes.string,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Dot;
|