Context Menu

PreviousNext
Docs
skyrblock

Preview

Loading preview…
components/context-menu/ContextMenu.tsx
'use client';

import { useComponentConfig } from '../config-provider/context';
import ContextMenuUI from './ContextMenuUI';
import type { ContextMenuProps } from './types';

const ContextMenu = (props: ContextMenuProps) => {
  const config = useComponentConfig('contextMenu');

  const mergedProps = {
    ...config,
    ...props
  };

  return (
    <ContextMenuUI
      {...mergedProps}
    />
  );
};

ContextMenu.displayName = 'ContextMenu';

export default ContextMenu;

Installation

npx shadcn@latest add @skyr/context-menu

Usage

import { ContextMenu } from "@/components/context-menu"
<ContextMenu />