Skip to content

Commit

Permalink
Downgrade Radix packages for type compat
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey committed Oct 8, 2024
1 parent 2bb1f4a commit b40c724
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"@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-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 +279,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
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5049,7 +5049,7 @@
resolved "https://registry.yarnpkg.com/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz#656432461fc8283d7b591dcf0d79152fae9ecc74"
integrity sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==

"@radix-ui/react-context-menu@2.2.2", "@radix-ui/react-context-menu@^2.0.1":
"@radix-ui/react-context-menu@^2.0.1":
version "2.2.2"
resolved "https://registry.yarnpkg.com/@radix-ui/react-context-menu/-/react-context-menu-2.2.2.tgz#efcddc559fc3011721b65148f062d04027f76c7a"
integrity sha512-99EatSTpW+hRYHt7m8wdDlLtkmTovEe8Z/hnxUPV+SKuuNL5HWNhQI4QSdjZqNSgXHay2z4M3Dym73j9p2Gx5Q==
Expand Down Expand Up @@ -5087,7 +5087,7 @@
"@radix-ui/react-use-callback-ref" "1.1.0"
"@radix-ui/react-use-escape-keydown" "1.1.0"

"@radix-ui/react-dropdown-menu@2.1.2", "@radix-ui/react-dropdown-menu@^2.0.1", "@radix-ui/react-dropdown-menu@^2.1.2":
"@radix-ui/react-dropdown-menu@^2.0.1":
version "2.1.2"
resolved "https://registry.yarnpkg.com/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.2.tgz#acc49577130e3c875ef0133bd1e271ea3392d924"
integrity sha512-GVZMR+eqK8/Kes0a36Qrv+i20bAPXSn8rCBTHx30w+3ECnR5o3xixAlqcVaYvLeyKUsm0aqyhWfmUcqufM8nYA==
Expand Down

0 comments on commit b40c724

Please sign in to comment.