8000 chore: replace MoreMenu with DropdownMenu by jaaydenh · Pull Request #17615 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

chore: replace MoreMenu with DropdownMenu #17615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 1, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: update to use DropdownMenu
  • Loading branch information
jaaydenh committed May 1, 2025
commit 82b9b09dbf289363b7221536ea58675db9054d54
86D1
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ import Checkbox from "@mui/material/Checkbox";
import TableCell from "@mui/material/TableCell";
import TableRow from "@mui/material/TableRow";
import type { BannerConfig } from "api/typesGenerated";
import {
MoreMenu,
MoreMenuContent,
MoreMenuItem,
MoreMenuTrigger,
ThreeDotsButton,
} from "components/MoreMenu/MoreMenu";
import { Button } from "components/Button/Button";
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "components/DropdownMenu/DropdownMenu";
import { EllipsisVertical } from "lucide-react";
import type { FC } from "react";

interface AnnouncementBannerItemProps {
Expand Down Expand Up @@ -48,17 +44,31 @@ export const AnnouncementBannerItem: FC<AnnouncementBannerItemProps> = ({
</TableCell>

<TableCell>
<MoreMenu>
<MoreMenuTrigger>
<ThreeDotsButton />
</MoreMenuTrigger>
<MoreMenuContent>
<MoreMenuItem onClick={() => onEdit()}>Edit&hellip;</MoreMenuItem>
<MoreMenuItem onClick={() => onDelete()} danger>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
size="icon-lg"
variant="subtle"
aria-label="Open menu"
>
<EllipsisVertical aria-hidden="true" />
<span className="sr-only">Open menu</span>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem
onClick={() => onEdit()}
>
Edit&hellip;
</DropdownMenuItem>
<DropdownMenuItem
className="text-content-destructive focus:text-content-destructive"
onClick={() => onDelete()}
>
Delete&hellip;
</MoreMenuItem>
</MoreMenuContent>
</MoreMenu>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</TableCell>
</TableRow>
);
Expand Down
0