mirror of
https://github.com/outline/outline.git
synced 2025-12-20 18:19:43 -06:00
28 lines
670 B
TypeScript
28 lines
670 B
TypeScript
import { MoreIcon } from "outline-icons";
|
|
import * as React from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
import { MenuButton } from "reakit/Menu";
|
|
import NudeButton from "~/components/NudeButton";
|
|
|
|
type Props = React.ComponentProps<typeof MenuButton> & {
|
|
className?: string;
|
|
};
|
|
|
|
export default function OverflowMenuButton({ className, ...rest }: Props) {
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<MenuButton {...rest}>
|
|
{(props) => (
|
|
<NudeButton
|
|
className={className}
|
|
aria-label={t("More options")}
|
|
{...props}
|
|
>
|
|
<MoreIcon />
|
|
</NudeButton>
|
|
)}
|
|
</MenuButton>
|
|
);
|
|
}
|