@hogoshi/ui 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -80,16 +80,21 @@ function editEntries(): ContextMenuEntry[] {
|
|
|
80
80
|
export const ContextMenuRoot = BaseContextMenu.Root;
|
|
81
81
|
export const ContextMenuTrigger = BaseContextMenu.Trigger;
|
|
82
82
|
|
|
83
|
-
export function ContextMenuContent({
|
|
83
|
+
export function ContextMenuContent({
|
|
84
|
+
edit = true,
|
|
85
|
+
className,
|
|
86
|
+
children,
|
|
87
|
+
...props
|
|
88
|
+
}: ComponentProps<typeof BaseContextMenu.Popup> & { edit?: boolean }) {
|
|
84
89
|
return (
|
|
85
90
|
<BaseContextMenu.Portal>
|
|
86
91
|
<BaseContextMenu.Positioner className="z-[var(--z-popover)]">
|
|
87
92
|
<BaseContextMenu.Popup className={cn(popupClass, className)} {...props}>
|
|
88
93
|
<Glide selector={HIGHLIGHTED} />
|
|
89
|
-
<EntryList items={editEntries()} />
|
|
94
|
+
{edit ? <EntryList items={editEntries()} /> : null}
|
|
90
95
|
{children ? (
|
|
91
96
|
<>
|
|
92
|
-
<Separator className="my-1" />
|
|
97
|
+
{edit ? <Separator className="my-1" /> : null}
|
|
93
98
|
{children}
|
|
94
99
|
</>
|
|
95
100
|
) : null}
|