mirror of
https://github.com/docmost/docmost.git
synced 2026-08-25 15:57:11 +08:00
13 lines
482 B
TypeScript
13 lines
482 B
TypeScript
import { UnstyledButton } from "@mantine/core";
|
|
import { type ComponentPropsWithoutRef, forwardRef } from "react";
|
|
|
|
// Menu.Item hard-codes role="menuitem"; use as its `component` to restore role="menuitemcheckbox" so aria-checked works.
|
|
export const CheckboxMenuItem = forwardRef<
|
|
HTMLButtonElement,
|
|
ComponentPropsWithoutRef<"button">
|
|
>((props, ref) => (
|
|
<UnstyledButton ref={ref} {...props} role="menuitemcheckbox" />
|
|
));
|
|
|
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|