From 58d49767f4b68fa3f00ad1a51750d4a97b9067bf Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sun, 11 Feb 2024 00:15:59 -0800
Subject: fix(error): use path store

---
 src/lib/Popup.svelte | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

(limited to 'src/lib/Popup.svelte')

diff --git a/src/lib/Popup.svelte b/src/lib/Popup.svelte
index 6a40517d..badd4f2c 100644
--- a/src/lib/Popup.svelte
+++ b/src/lib/Popup.svelte
@@ -7,6 +7,7 @@
 	export let fullscreen = false;
 	export let show = true;
 	export let locked = false;
+	export let center = false;
 
 	const handleClickOutside = (event: any) => {
 		if (!locked && event.target.classList.contains('popup')) {
@@ -21,7 +22,9 @@
 
 {#if show}
 	<div class={`popup ${fullscreen ? 'popup-fullscreen' : ''}`}>
-		<span class={card ? `card ${smallCard ? 'card-small' : ''}` : ''}>
+		<span
+			class={`${card ? `card ${smallCard ? 'card-small' : ''}` : ''} ${center ? 'centered' : ''}`}
+		>
 			<slot />
 		</span>
 	</div>
@@ -31,4 +34,10 @@
 	.popup {
 		z-index: 3;
 	}
+
+	.centered {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
 </style>
-- 
cgit v1.2.3

