From 521a68b4c7a2f11902ee8f735d966b3d029a22ec Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 22 Jan 2024 17:48:05 +0100 Subject: [PATCH] Allow the popup to be styled --- front/packages/primitives/src/popup.tsx | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/front/packages/primitives/src/popup.tsx b/front/packages/primitives/src/popup.tsx index 666fe232..18800133 100644 --- a/front/packages/primitives/src/popup.tsx +++ b/front/packages/primitives/src/popup.tsx @@ -27,22 +27,25 @@ import { imageBorderRadius } from "./constants"; import { px } from "yoshiki/native"; import { ts } from "./utils"; -export const Popup = ({ children }: { children: ReactNode | YoshikiFunc }) => { +export const Popup = ({ children, ...props }: { children: ReactNode | YoshikiFunc }) => { return ( {({ css, theme }) => ( theme.themeOverlay, - justifyContent: "center", - alignItems: "center", - })} + {...css( + { + position: "absolute", + top: 0, + left: 0, + right: 0, + bottom: 0, + bg: (theme) => theme.themeOverlay, + justifyContent: "center", + alignItems: "center", + }, + props, + )} >