Migrated TagsSelector test to react testing library

This commit is contained in:
Alejandro Celaya
2022-07-17 10:01:35 +02:00
parent fc4fdb4fc7
commit d627de8e83
3 changed files with 57 additions and 51 deletions

View File

@@ -19,6 +19,8 @@ export const Tag: FC<TagProps> = ({ text, children, clearable, className = '', c
onClick={onClick}
>
{children ?? text}
{clearable && <span aria-label="Close" className="close tag__close-selected-tag" onClick={onClose}>&times;</span>}
{clearable && (
<span aria-label={`Remove ${text}`} className="close tag__close-selected-tag" onClick={onClose}>&times;</span>
)}
</span>
);