mirror of
https://github.com/outline/outline.git
synced 2026-12-02 09:42:07 +03:00
29 lines
711 B
TypeScript
29 lines
711 B
TypeScript
import type * as DropdownMenuPrimitive from "radix-ui/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;
|
|
ref?: React.Ref<HTMLButtonElement>;
|
|
};
|
|
|
|
export function OverflowMenuButton({
|
|
ref,
|
|
neutral,
|
|
className,
|
|
...rest
|
|
}: Props) {
|
|
return neutral ? (
|
|
<Button ref={ref} icon={<MoreIcon />} neutral borderOnHover {...rest} />
|
|
) : (
|
|
<NudeButton ref={ref} className={className} {...rest}>
|
|
<MoreIcon />
|
|
</NudeButton>
|
|
);
|
|
}
|