fix: display error status

This commit is contained in:
Nikola Ubavic 2022-09-26 14:40:59 +02:00 committed by Rafael
parent a29f3fc13c
commit 65e5c12b92
3 changed files with 15 additions and 8 deletions

View file

@ -17,6 +17,7 @@ const CopyToClipboard = ({
buttonClassname,
children,
wrapperClassname,
removeSpace = true,
...props
}) => {
const [anchorEl, setAnchorEl] = useState(null)
@ -46,7 +47,8 @@ const CopyToClipboard = ({
{children}
</div>
<div className={classnames(classes.buttonWrapper, buttonClassname)}>
<ReactCopyToClipboard text={R.replace(/\s/g, '')(children)}>
<ReactCopyToClipboard
text={removeSpace ? R.replace(/\s/g, '')(children) : children}>
<button
aria-describedby={id}
onClick={event => handleClick(event)}>