Skip to content

Commit 2830801

Browse files
committed
Remove DropdownMenuComponent
1 parent 0699cb4 commit 2830801

File tree

3 files changed

+13
-25
lines changed

3 files changed

+13
-25
lines changed

site/src/components/DropdownMenu/DropdownMenu.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -216,23 +216,3 @@ export const DropdownMenuShortcut = ({
216216
);
217217
};
218218
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
219-
220-
export interface DropdownMenuButtonProps
221-
extends ComponentPropsWithoutRef<typeof Button> {}
222-
223-
export const DropdownMenuButton = forwardRef<
224-
HTMLButtonElement,
225-
DropdownMenuButtonProps
226-
>(({ children, ...props }, ref) => {
227-
return (
228-
<Button ref={ref} variant="outline" {...props}>
229-
{children}
230-
<DropdownMenuChevronDown />
231-
</Button>
232-
);
233-
});
234-
DropdownMenuButton.displayName = "DropdownMenuButton";
235-
236-
export const DropdownMenuChevronDown: FC = () => {
237-
return <ChevronDownIcon className="text-content-primary !size-icon-xs" />;
238-
};

site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import { type Interpolation, type Theme, css, useTheme } from "@emotion/react";
22
import MenuItem from "@mui/material/MenuItem";
3-
import { DropdownMenuButton } from "components/DropdownMenu/DropdownMenu";
3+
import { Button } from "components/Button/Button";
44
import { FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge";
55
import {
66
Popover,
77
PopoverContent,
88
PopoverTrigger,
99
usePopover,
1010
} from "components/deprecated/Popover/Popover";
11+
import { ChevronDownIcon } from "lucide-react";
1112
import { linkToAuditing } from "modules/navigation";
1213
import type { FC } from "react";
1314
import { NavLink } from "react-router-dom";
@@ -39,7 +40,10 @@ export const DeploymentDropdown: FC<DeploymentDropdownProps> = ({
3940
return (
4041
<Popover>
4142
<PopoverTrigger>
42-
<DropdownMenuButton size="lg">Admin settings</DropdownMenuButton>
43+
<Button variant="outline" size="lg">
44+
Admin settings
45+
<ChevronDownIcon className="text-content-primary !size-icon-xs" />
46+
</Button>
4347
</PopoverTrigger>
4448

4549
<PopoverContent

site/src/modules/dashboard/Navbar/ProxyMenu.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ import Skeleton from "@mui/material/Skeleton";
66
import { visuallyHidden } from "@mui/utils";
77
import type * as TypesGen from "api/typesGenerated";
88
import { Abbr } from "components/Abbr/Abbr";
9-
import { DropdownMenuButton } from "components/DropdownMenu/DropdownMenu";
109
import { displayError } from "components/GlobalSnackbar/utils";
1110
import { Latency } from "components/Latency/Latency";
1211
import type { ProxyContextValue } from "contexts/ProxyContext";
1312
import { useAuthenticated } from "contexts/auth/RequireAuth";
1413
import { type FC, useRef, useState } from "react";
1514
import { useNavigate } from "react-router-dom";
1615
import { sortProxiesByLatency } from "./proxyUtils";
16+
import { Button } from "components/Button/Button";
17+
import { ChevronDownIcon } from "lucide-react";
1718

1819
interface ProxyMenuProps {
1920
proxyContextValue: ProxyContextValue;
@@ -69,7 +70,8 @@ export const ProxyMenu: FC<ProxyMenuProps> = ({ proxyContextValue }) => {
6970

7071
return (
7172
<>
72-
<DropdownMenuButton
73+
<Button
74+
variant="outline"
7375
ref={buttonRef}
7476
onClick={() => setIsOpen(true)}
7577
size="lg"
@@ -102,7 +104,9 @@ export const ProxyMenu: FC<ProxyMenuProps> = ({ proxyContextValue }) => {
102104
) : (
103105
"Select Proxy"
104106
)}
105-
</DropdownMenuButton>
107+
108+
<ChevronDownIcon className="text-content-primary !size-icon-xs" />
109+
</Button>
106110

107111
<Menu
108112
open={isOpen}

0 commit comments

Comments
 (0)