diff --git a/front/packages/primitives/package.json b/front/packages/primitives/package.json index 5c929137..de70aa63 100644 --- a/front/packages/primitives/package.json +++ b/front/packages/primitives/package.json @@ -21,6 +21,7 @@ "react-native-blurhash": "*", "react-native-fast-image": "*", "react-native-reanimated": "*", + "react-native-safe-area-context": "*", "react-native-svg": "*", "yoshiki": "*" }, @@ -40,6 +41,9 @@ "react-native-fast-image": { "optional": true }, + "react-native-safe-area-context": { + "optional": true + }, "react-native-web": { "optional": true } diff --git a/front/packages/primitives/src/menu.tsx b/front/packages/primitives/src/menu.tsx index c332068f..32409128 100644 --- a/front/packages/primitives/src/menu.tsx +++ b/front/packages/primitives/src/menu.tsx @@ -30,6 +30,7 @@ import { useState, } from "react"; import { StyleSheet, Pressable, View } from "react-native"; +import { useSafeAreaInsets } from "react-native-safe-area-context"; import { percent, px, sm, useYoshiki, vh, xl } from "yoshiki/native"; import Close from "@material-symbols/svg-400/rounded/close-fill.svg"; import { Icon, IconButton } from "./icons"; @@ -55,6 +56,7 @@ const Menu = ({ onMenuOpen?: () => void; onMenuClose?: () => void; } & Omit) => { + const insets = useSafeAreaInsets(); const [isOpen, setOpen] = useState(false); useEffect(() => { @@ -89,6 +91,7 @@ const Menu = ({ borderTopRightRadius: { xs: px(26), xl: 0 }, paddingTop: { xs: px(26), xl: 0 }, marginTop: { xs: px(72), xl: 0 }, + paddingBottom: insets.bottom, }, sm({ maxWidth: px(640), diff --git a/front/packages/ui/src/components/context-menus.tsx b/front/packages/ui/src/components/context-menus.tsx new file mode 100644 index 00000000..b5794c7c --- /dev/null +++ b/front/packages/ui/src/components/context-menus.tsx @@ -0,0 +1,9 @@ +import { Menu } from "@kyoo/primitives"; + +export const EpisodesContext = () => { + return ( + + + + ); +}; diff --git a/front/yarn.lock b/front/yarn.lock index 760d5dd5..ec7c8e36 100644 --- a/front/yarn.lock +++ b/front/yarn.lock @@ -2900,6 +2900,7 @@ __metadata: react-native-blurhash: "*" react-native-fast-image: "*" react-native-reanimated: "*" + react-native-safe-area-context: "*" react-native-svg: "*" yoshiki: "*" dependenciesMeta: @@ -2920,6 +2921,8 @@ __metadata: optional: true react-native-fast-image: optional: true + react-native-safe-area-context: + optional: true react-native-web: optional: true languageName: unknown