Add Browsers (browser management) to cloud app (#3549)

This commit is contained in:
Jonathan Dobson
2025-09-29 14:05:30 -04:00
committed by GitHub
parent f2d32da914
commit e04f81fcda
11 changed files with 687 additions and 119 deletions

View File

@@ -108,7 +108,7 @@ interface Dom {
splitLeft: MutableRefObject<HTMLInputElement | null>;
}
function CopyText({ text }: { text: string }) {
function CopyText({ className, text }: { className?: string; text: string }) {
const [wasCopied, setWasCopied] = useState(false);
function handleCopy(code: string) {
@@ -118,7 +118,15 @@ function CopyText({ text }: { text: string }) {
}
return (
<Button size="icon" variant="link" onClick={() => handleCopy(text)}>
<Button
className={className}
size="icon"
variant="link"
onClick={(e) => {
e.stopPropagation();
handleCopy(text);
}}
>
{wasCopied ? <CheckIcon /> : <CopyIcon />}
</Button>
);