@@ -18,7 +18,7 @@ import {
|
||||
|
||||
export interface ContextMenuProps<T extends HTMLElement> {
|
||||
onOpen?: () => void
|
||||
renderMenu: () => JSX.Element | null
|
||||
renderMenu: ({ onClose }: { onClose: () => void }) => JSX.Element | null
|
||||
children: (
|
||||
ref: MutableRefObject<T | null>,
|
||||
isOpened: boolean
|
||||
@@ -101,7 +101,7 @@ export function ContextMenu<T extends HTMLElement = HTMLElement>(
|
||||
}}
|
||||
{...props.menuButtonProps}
|
||||
/>
|
||||
{props.renderMenu()}
|
||||
{props.renderMenu({ onClose: onCloseHandler })}
|
||||
</Menu>
|
||||
</Portal>
|
||||
)}
|
||||
|
||||
@@ -662,3 +662,12 @@ export const UnlinkIcon = (props: IconProps) => (
|
||||
<line x1="19" x2="22" y1="16" y2="16" />
|
||||
</Icon>
|
||||
)
|
||||
|
||||
export const RepeatIcon = (props: IconProps) => (
|
||||
<Icon viewBox="0 0 24 24" {...featherIconsBaseProps} {...props}>
|
||||
<path d="m2 9 3-3 3 3" />
|
||||
<path d="M13 18H7a2 2 0 0 1-2-2V6" />
|
||||
<path d="m22 15-3 3-3-3" />
|
||||
<path d="M11 6h6a2 2 0 0 1 2 2v10" />
|
||||
</Icon>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user