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