import type React from 'react' import type { BadgeProps } from './badge' import { classNames } from '../../utils/classNames' import styles from './badge.module.scss' export type Props = BadgeProps> & { onClick?: React.MouseEventHandler children?: React.ReactNode } const Badge = ({ theme, onClick, hover, small, rounded, transparent, className, children, ...rest }: Props) => { const classes = classNames([ styles.badge, theme && styles[theme], (onClick || hover) && styles.hover, small && styles.small, rounded && styles.round, transparent && styles.transparent, className ]) if (onClick) { return ( ) } return ( {children} ) } export default Badge