mirror of
				https://gitlab.nic.cz/turris/reforis/foris-js.git
				synced 2025-11-03 23:00:31 +01:00 
			
		
		
		
	Refactor CopyInput component
Remove unnecessary input-group-append div and simplify structure
This commit is contained in:
		@@ -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>
 | 
			
		||||
    );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user