Skip to content

Commit 14c6c9f

Browse files
aidenybaiamiagent
andcommitted
make command text selectable in copy block
Generated with [Ami](https://ami.dev) Co-Authored-By: Ami <noreply@ami.dev>
1 parent 4b481c8 commit 14c6c9f

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

packages/website/src/components/terminal.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,12 @@ const CopyCommand = () => {
199199
: "shrink-0 text-white/50 transition-colors group-hover:text-white";
200200

201201
return (
202-
<button
203-
onClick={handleCopy}
204-
className="group flex items-center gap-4 border border-white/20 px-3 py-1.5 transition-colors hover:bg-white/5"
205-
>
206-
<span className="whitespace-nowrap text-white">{COMMAND}</span>
207-
<IconComponent size={16} className={iconClass} />
208-
</button>
202+
<div className="group flex items-center gap-4 border border-white/20 px-3 py-1.5 transition-colors hover:bg-white/5">
203+
<span className="select-all whitespace-nowrap text-white">{COMMAND}</span>
204+
<button onClick={handleCopy}>
205+
<IconComponent size={16} className={iconClass} />
206+
</button>
207+
</div>
209208
);
210209
};
211210

0 commit comments

Comments
 (0)