Files
outline/app/menus/ShareMenu.tsx
T
Tom MoorandClaude Opus 5 2cc0d60ed8 feat: Multi-select in the shares settings table (#13360)
Revoking a share link now operates on every active share, so it can be
performed from the bulk selection toolbar as well as the row menu. The
copy link and go to source actions read their share from the action
context too, and hide when a multi-selection is active.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 22:16:20 -04:00

32 lines
899 B
TypeScript

import { observer } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import type Share from "~/models/Share";
import { DropdownMenu } from "~/components/Menu/DropdownMenu";
import { OverflowMenuButton } from "~/components/Menu/OverflowMenuButton";
import { ActionContextProvider } from "~/hooks/useActionContext";
import { useShareMenuActions } from "~/hooks/useShareMenuActions";
type Props = {
share: Share;
};
function ShareMenu({ share }: Props) {
const { t } = useTranslation();
const rootAction = useShareMenuActions();
return (
<ActionContextProvider value={{ activeModels: [share] }}>
<DropdownMenu
action={rootAction}
align="end"
ariaLabel={t("Share options")}
>
<OverflowMenuButton />
</DropdownMenu>
</ActionContextProvider>
);
}
export default observer(ShareMenu);