Skip to content

Commit dc36ba4

Browse files
authored
Changed the random script button to be the same as all the other buttons (#4183)
1 parent 15deb9c commit dc36ba4

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

frontend/src/components/CommandMenu.tsx

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ import React from "react";
1616
import { Badge } from "./ui/badge";
1717
import { Button } from "./ui/button";
1818
import { DialogTitle } from "./ui/dialog";
19-
import { Sparkles } from "lucide-react"; // <- Hinzugefügt
19+
import { Sparkles } from "lucide-react";
20+
import { TooltipContent, TooltipProvider } from "./ui/tooltip";
21+
import { TooltipTrigger } from "./ui/tooltip";
22+
import { Tooltip } from "./ui/tooltip";
2023

2124
export const formattedBadge = (type: string) => {
2225
switch (type) {
@@ -111,16 +114,19 @@ export default function CommandMenu() {
111114
</kbd>
112115
</Button>
113116

114-
<Button
115-
variant="outline"
116-
size="icon"
117-
onClick={openRandomScript}
118-
title="Open random script"
119-
disabled={isLoading}
120-
className="h-9 w-9"
121-
>
122-
<Sparkles className="h-5 w-5" />
123-
</Button>
117+
<TooltipProvider>
118+
<Tooltip delayDuration={100}>
119+
<TooltipTrigger asChild>
120+
<Button variant="outline" size="icon" onClick={openRandomScript} disabled={isLoading} className="hidden lg:flex">
121+
<Sparkles className="size-4" />
122+
<span className="sr-only">Open Random Script</span>
123+
</Button>
124+
</TooltipTrigger>
125+
<TooltipContent>
126+
<p>Open Random Script</p>
127+
</TooltipContent>
128+
</Tooltip>
129+
</TooltipProvider>
124130
</div>
125131

126132
<CommandDialog open={open} onOpenChange={setOpen}>

frontend/src/components/ui/code-copy-button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ export default function CodeCopyButton({
4141

4242
return (
4343
<div className="mt-4 flex">
44-
<Card className="flex items-center overflow-x-auto bg-primary-foreground pl-4">
45-
<div className="overflow-x-auto whitespace-pre-wrap text-nowrap break-all pr-4 text-sm">
44+
<Card className="flex items-center overflow-x-auto bg-primary-foreground pl-4 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20">
45+
<div className="overflow-x-auto whitespace-pre-wrap text-nowrap break-all pr-4 text-sm [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20">
4646
{!isMobile && children ? children : "Copy install command"}
4747
</div>
4848
<button

0 commit comments

Comments
 (0)