Center popups on the screen

This commit is contained in:
Zoe Roux 2024-01-22 17:06:30 +01:00
parent 5f7ef2a18e
commit 8e74413e18

View File

@ -24,7 +24,7 @@ import { Portal } from "@gorhom/portal";
import { SwitchVariant, YoshikiFunc } from "./themes"; import { SwitchVariant, YoshikiFunc } from "./themes";
import { View } from "react-native"; import { View } from "react-native";
import { imageBorderRadius } from "./constants"; import { imageBorderRadius } from "./constants";
import { percent, px } from "yoshiki/native"; import { px } from "yoshiki/native";
import { ts } from "./utils"; import { ts } from "./utils";
export const Popup = ({ children }: { children: ReactNode | YoshikiFunc<ReactNode> }) => { export const Popup = ({ children }: { children: ReactNode | YoshikiFunc<ReactNode> }) => {
@ -40,13 +40,13 @@ export const Popup = ({ children }: { children: ReactNode | YoshikiFunc<ReactNod
right: 0, right: 0,
bottom: 0, bottom: 0,
bg: (theme) => theme.themeOverlay, bg: (theme) => theme.themeOverlay,
justifyContent: "center",
alignItems: "center",
})} })}
> >
<Container <Container
{...css({ {...css({
borderRadius: px(imageBorderRadius), borderRadius: px(imageBorderRadius),
position: "absolute",
top: percent(35),
padding: ts(4), padding: ts(4),
gap: ts(2), gap: ts(2),
bg: (theme) => theme.background, bg: (theme) => theme.background,