mirror of
https://github.com/outline/outline.git
synced 2026-11-21 21:44:30 +03:00
* chore: Move `CollectionMenu` to Radix
* action button supports v2
* rename button
* respect disabled pointer-events
* separator should go all the way
* Revert "separator should go all the way"
This reverts commit c76afa1252.
25 lines
769 B
TypeScript
25 lines
769 B
TypeScript
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
import { MoreIcon } from "outline-icons";
|
|
import * as React from "react";
|
|
import Button from "~/components/Button";
|
|
import NudeButton from "~/components/NudeButton";
|
|
|
|
type Props = React.ComponentPropsWithoutRef<
|
|
typeof DropdownMenuPrimitive.Trigger
|
|
> & {
|
|
neutral?: boolean;
|
|
className?: string;
|
|
};
|
|
|
|
export const OverflowMenuButton = React.forwardRef<HTMLButtonElement, Props>(
|
|
({ neutral, className, ...rest }, ref) =>
|
|
neutral ? (
|
|
<Button ref={ref} icon={<MoreIcon />} neutral borderOnHover {...rest} />
|
|
) : (
|
|
<NudeButton ref={ref} className={className} {...rest}>
|
|
<MoreIcon />
|
|
</NudeButton>
|
|
)
|
|
);
|
|
OverflowMenuButton.displayName = "OverflowMenuButton";
|