(ref: React.ForwardedRef<T>, node: T | null)
| 125 | DropdownMenuTrigger.displayName = 'DropdownMenuTrigger'; |
| 126 | |
| 127 | const assignRef = <T,>(ref: React.ForwardedRef<T>, node: T | null) => { |
| 128 | if (typeof ref === 'function') { |
| 129 | ref(node); |
| 130 | } else if (ref) { |
| 131 | Object.assign(ref, { current: node }); |
| 132 | } |
| 133 | }; |
| 134 | |
| 135 | // Content rendered outside a DropdownMenu falls back to its own check. |
| 136 | export const useDropdownMenuIsPhone = (): boolean => { |