25 lines
997 B
TypeScript
25 lines
997 B
TypeScript
// @subframe/sync-disable
|
|
"use client";
|
|
import React from "react";
|
|
import { ContextMenu as ContextMenuComponent } from "./ContextMenu";
|
|
import { CONTEXT_MENU_MOTION_CLASS } from "../../floating-motion";
|
|
import * as SubframeUtils from "../../utils";
|
|
|
|
/**
|
|
* Add wrapper components and business logic here.
|
|
* If you modify this file, disable Subframe sync for it to prevent overwrites.
|
|
* Learn more: https://docs.subframe.com/concepts/syncing-components#wrapping-components
|
|
*/
|
|
|
|
const ContextMenuRoot = React.forwardRef<
|
|
React.ElementRef<typeof ContextMenuComponent>,
|
|
React.ComponentProps<typeof ContextMenuComponent>
|
|
>(function ContextMenuRoot({ className, ...otherProps }, ref) {
|
|
return <ContextMenuComponent className={SubframeUtils.twClassNames(CONTEXT_MENU_MOTION_CLASS, className)} ref={ref} {...otherProps} />;
|
|
});
|
|
|
|
export const ContextMenu = Object.assign(ContextMenuRoot, {
|
|
ContextDivider: ContextMenuComponent.ContextDivider,
|
|
ContextItem: ContextMenuComponent.ContextItem,
|
|
});
|