feature(components): prop-type Tag

This commit is contained in:
Alexander Klein 2021-02-16 14:08:29 +01:00
parent cb4e481e5f
commit f14cafe926

View File

@ -1,7 +1,15 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames'; import classNames from 'classnames';
import styles from './Tag.module.css'; import styles from './Tag.module.css';
export default function Tag({ className, children }) { function Tag({ className, children }) {
return <span className={classNames(styles.tag, className)}>{children}</span>; return <span className={classNames(styles.tag, className)}>{children}</span>;
} }
Tag.propTypes = {
className: PropTypes.string,
children: PropTypes.node,
};
export default Tag;