1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-12-25 00:11:36 +01:00

Refactor CopyInput component

Remove unnecessary input-group-append div and simplify structure
This commit is contained in:
Aleksandr Gumroian 2024-09-23 13:59:17 +02:00
parent acfbeb2c43
commit c7ff3f42f6
No known key found for this signature in database
GPG Key ID: 9E77849C64F0A733

View File

@ -48,15 +48,13 @@ function CopyInput({ value, ...props }) {
return (
<Input type="text" value={value} ref={inputTextRef} {...props}>
<div className="input-group-append">
<button
className="btn btn-outline-secondary"
type="button"
onClick={handleCopyClick}
>
<span>{isCopied ? _("Copied!") : _("Copy")}</span>
</button>
</div>
<button
className="btn btn-outline-secondary"
type="button"
onClick={handleCopyClick}
>
<span>{isCopied ? _("Copied!") : _("Copy")}</span>
</button>
</Input>
);
}