Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disagreement on accepted props between ContextMenuContentProps type definition and documentation for React Context Menu #3208

Open
buyblvd-ryan opened this issue Nov 2, 2024 · 0 comments

Comments

@buyblvd-ryan
Copy link

Bug report

Current Behavior

Currently, the documentation for React Context Menu indicates that side, alignment, and sideOffset are configurable for Context Menu.

Code example from top of page:

<ContextMenu.Content
	className="ContextMenuContent"
	sideOffset={5}
	align="end"
>
...
</ContextMenu.Content>

Features section includes:

Customize side, alignment, offsets, collision handling.

But ContextMenuContentProps is defined as follows:

interface ContextMenuContentProps extends Omit<MenuContentProps, 'onEntryFocus' | 'side' | 'sideOffset' | 'align'> {}

Accordingly, ContextMenu.Content elements do not accept accept any of those props.

Expected behavior

These things should be in agreement.

Reproducible example

N/A

Suggested solution

Correct either the type definition or the documentation based on intended behavior. (I vote for allowing these props for maximum customization. e.g. replacing default context menu behavior on mobile with a maximally configurable menu)

Additional context

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-context-menu 2.2.2
React n/a 19.0.0-rc-7c8e5e7a-20241101
Browser n/a n/a
Assistive tech n/a n/a
Node n/a v20.18.0
npm/yarn pnpm 9.12.2
Operating System Windows 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant