mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-30 19:54:16 -04:00
Center popups on the screen
This commit is contained in:
parent
5f7ef2a18e
commit
8e74413e18
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user