mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Styling.
This commit is contained in:
parent
c88f3c84eb
commit
461661afc6
4 changed files with 50 additions and 8 deletions
|
@ -2,29 +2,29 @@ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|||
import React from "react";
|
||||
import MenuItemContent from "./DropdownMenuItemContent";
|
||||
import { getDropdownMenuItemClassName } from "./common";
|
||||
import { ChevronRight } from "../icons";
|
||||
|
||||
const DropdownMenuSubTrigger = ({
|
||||
children,
|
||||
icon,
|
||||
shortcut,
|
||||
className,
|
||||
...rest
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
icon?: JSX.Element;
|
||||
shortcut?: string;
|
||||
className?: string;
|
||||
} & React.HTMLAttributes<HTMLDivElement>) => {
|
||||
return (
|
||||
<DropdownMenuPrimitive.SubTrigger className="radix-menuitem">
|
||||
<DropdownMenuPrimitive.SubTrigger className="radix-menuitem dropdown-menu__submenu-trigger">
|
||||
<div
|
||||
{...rest}
|
||||
className={getDropdownMenuItemClassName(className)}
|
||||
title={rest.title ?? rest["aria-label"]}
|
||||
>
|
||||
<MenuItemContent icon={icon} shortcut={shortcut}>
|
||||
{children}
|
||||
</MenuItemContent>
|
||||
<MenuItemContent icon={icon}>{children}</MenuItemContent>
|
||||
<div className="dropdown-menu__submenu-trigger-icon">
|
||||
{ChevronRight}
|
||||
</div>
|
||||
</div>
|
||||
</DropdownMenuPrimitive.SubTrigger>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue