Skip to content

Commit

Permalink
Downgrade Radix packages for type compat (#5653)
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey authored Oct 8, 2024
1 parent 2bb1f4a commit 8fe2427
Show file tree
Hide file tree
Showing 3 changed files with 289 additions and 12 deletions.
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@mattermost/react-native-paste-input": "^0.7.1",
"@miblanchard/react-native-slider": "^2.3.1",
"@radix-ui/react-dismissable-layer": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.2",
"@radix-ui/react-dropdown-menu": "2.0.1",
"@radix-ui/react-focus-guards": "^1.1.1",
"@radix-ui/react-focus-scope": "^1.1.0",
"@react-native-async-storage/async-storage": "1.23.1",
Expand Down Expand Up @@ -280,10 +280,7 @@
"**/zod": "3.23.8",
"**/expo-constants": "16.0.1",
"**/expo-device": "6.0.2",
"@react-native/babel-preset": "0.74.1",
"@radix-ui/react-dropdown-menu": "2.1.2",
"@radix-ui/react-context-menu": "2.2.2",
"@radix-ui/react-focus-scope": "1.1.0"
"@react-native/babel-preset": "0.74.1"
},
"jest": {
"preset": "jest-expo/ios",
Expand Down
9 changes: 5 additions & 4 deletions src/view/com/util/forms/NativeDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import * as DropdownMenu from 'zeego/dropdown-menu'
import {MenuItemCommonProps} from 'zeego/lib/typescript/menu'

import {HITSLOP_10} from 'lib/constants'
import {usePalette} from 'lib/hooks/usePalette'
import {useTheme} from 'lib/ThemeContext'
import {isIOS, isWeb} from 'platform/detection'
import {HITSLOP_10} from '#/lib/constants'
import {usePalette} from '#/lib/hooks/usePalette'
import {useTheme} from '#/lib/ThemeContext'
import {isIOS, isWeb} from '#/platform/detection'
import {Portal} from '#/components/Portal'

// Custom Dropdown Menu Components
Expand Down Expand Up @@ -190,6 +190,7 @@ export function NativeDropdown({
accessibilityHint={accessibilityHint}>
{children}
</DropdownMenuTrigger>
{/* @ts-ignore inheriting props from Radix, which is only for web */}
<DropdownMenuContent
style={[styles.content, dropDownBackgroundColor]}
loop>
Expand Down
Loading

0 comments on commit 8fe2427

Please sign in to comment.