mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
23177578b2
* Initial plan * Add context menu support for table rows in settings Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> * Fix file formatting Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> * Add context menu support to all settings tables Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> * refactor * Reuse hooks * EmojiMenu --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> Co-authored-by: Tom Moor <tom@getoutline.com>
29 lines
735 B
TypeScript
29 lines
735 B
TypeScript
import { observer } from "mobx-react";
|
|
import * as React from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
import type Emoji from "~/models/Emoji";
|
|
import { DropdownMenu } from "~/components/Menu/DropdownMenu";
|
|
import { OverflowMenuButton } from "~/components/Menu/OverflowMenuButton";
|
|
import { useEmojiMenuActions } from "~/hooks/useEmojiMenuActions";
|
|
|
|
type Props = {
|
|
emoji: Emoji;
|
|
};
|
|
|
|
function EmojisMenu({ emoji }: Props) {
|
|
const { t } = useTranslation();
|
|
const rootAction = useEmojiMenuActions(emoji);
|
|
|
|
return (
|
|
<DropdownMenu
|
|
action={rootAction}
|
|
align="end"
|
|
ariaLabel={t("Emoji options")}
|
|
>
|
|
<OverflowMenuButton />
|
|
</DropdownMenu>
|
|
);
|
|
}
|
|
|
|
export default observer(EmojisMenu);
|