File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
app/scripts/_components/ScriptItems Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 1
- import { Button } from "@/components/ui/button" ;
1
+ import { Button , buttonVariants } from "@/components/ui/button" ;
2
2
import handleCopy from "@/lib/handleCopy" ;
3
+ import { cn } from "@/lib/utils" ;
4
+ import { ClipboardIcon } from "lucide-react" ;
3
5
4
6
interface Item {
5
7
interface ?: string ;
@@ -13,13 +15,13 @@ const CopyButton = ({
13
15
label : string ;
14
16
value : string | number ;
15
17
} ) => (
16
- < Button
17
- variant = "secondary"
18
- size = "sm"
19
- onClick = { ( ) => handleCopy ( label , String ( value ) ) }
20
- >
18
+ < span className = { cn ( buttonVariants ( { size : "sm" , variant : "secondary" } ) , "flex items-center gap-2" ) } >
21
19
{ value }
22
- </ Button >
20
+ < ClipboardIcon
21
+ onClick = { ( ) => handleCopy ( label , String ( value ) ) }
22
+ className = "size-4 cursor-pointer"
23
+ />
24
+ </ span >
23
25
) ;
24
26
25
27
export default function InterFaces ( { item } : { item : Item } ) {
Original file line number Diff line number Diff line change 1
1
import { Button } from "@/components/ui/button" ;
2
2
import handleCopy from "./handleCopy" ;
3
- import { Copy } from "lucide-react" ;
3
+ import { ClipboardIcon , Copy } from "lucide-react" ;
4
4
5
5
export default function TextCopyBlock ( description : string ) {
6
6
const pattern = / ` ( [ ^ ` ] * ) ` / g;
@@ -14,7 +14,7 @@ export default function TextCopyBlock(description: string) {
14
14
className = "bg-secondary py-1 px-2 rounded-lg inline-flex items-center gap-2"
15
15
>
16
16
{ part }
17
- < Copy
17
+ < ClipboardIcon
18
18
className = "size-3 cursor-pointer"
19
19
onClick = { ( ) => handleCopy ( "command" , part ) }
20
20
/>
You can’t perform that action at this time.
0 commit comments