import { useState, type FC, type ReactElement, type HTMLAttributes, useId, } from 'react'; import cn from 'classnames'; import EvidenceTagIcon from '../svg/evidence-tag.svg'; import '../styles/components/evidence-tag.scss'; const size = 12; const defaultIcon = ; type EvidenceTagProps = { /** * Displayed on the tag */ label: string; /** * Icon to display */ iconComponent?: ReactElement; }; const EvidenceTag: FC> = ({ label, title, className, iconComponent = defaultIcon, children, ...props }) => { const buttonId = useId(); const [contentDisplay, setContentDisplay] = useState(false); return ( <> {children && (
{contentDisplay && children}
)} ); }; export default EvidenceTag;