1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-11-14 17:35:35 +01:00

Compare commits

..

2 Commits

Author SHA1 Message Date
Aleksandr Gumroian
f34d9bbdbd Merge branch 'fix-copy-input' into 'dev'
Refactor CopyInput component

See merge request turris/reforis/foris-js!241
2024-09-23 14:07:06 +02:00
Aleksandr Gumroian
c7ff3f42f6
Refactor CopyInput component
Remove unnecessary input-group-append div and simplify structure
2024-09-23 13:59:31 +02:00

View File

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