How to detect if something is within a MenuTrigger #6345
Answered
by
snowystinger
synecdokey
asked this question in
Q&A
-
We styled a button differently depending on whether it is part of a MenuTrigger. We did so by using within the button to 'detect' it: const [{ id: menuId }] = useContextProps<
MenuProps<MenuItemProps>,
MenuProps<MenuItemProps>,
HTMLDivElement
>({}, null, MenuContext); Am I missing a more obvious way to do this? |
Beta Was this translation helpful? Give feedback.
Answered by
snowystinger
May 8, 2024
Replies: 1 comment 2 replies
-
Could you make your own context which you write to in a menu trigger and read from in a button? |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
synecdokey
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could you make your own context which you write to in a menu trigger and read from in a button?