Skip to content

Commit b70c3b5

Browse files
commrelayunitC-3PO
andauthored
Keep custom QR readable in light mode (#119)
* Keep custom QR readable in light mode * Center custom QR frame on mobile --------- Co-authored-by: C-3PO <c3po.bot@gmail.com>
1 parent 025986a commit b70c3b5

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/components/vaults/QRCodeDialog.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,12 +271,12 @@ export function QRCodeDialog({ vault, onVaultUpdate }: QRCodeDialogProps) {
271271
</DialogTitle>
272272
</DialogHeader>
273273
<div className="flex flex-col items-center gap-3 sm:gap-6 py-2 sm:py-5">
274-
<div className="w-full max-w-[276px] sm:max-w-[456px] p-0 rounded-2xl sm:rounded-3xl shadow-xl glow-purple">
275-
<div className="p-0 bg-transparent rounded-xl sm:rounded-2xl relative overflow-hidden">
274+
<div className="mx-auto w-full max-w-[276px] self-center rounded-2xl bg-[#0d0d0f] p-0 shadow-xl glow-purple sm:max-w-[456px] sm:rounded-3xl">
275+
<div className="relative overflow-hidden rounded-xl bg-[#0d0d0f] p-0 sm:rounded-2xl">
276276
<div
277277
ref={qrRef}
278278
className={cn(
279-
"relative flex items-center justify-center rounded-xl sm:rounded-2xl",
279+
"relative flex items-center justify-center rounded-xl bg-[#0d0d0f] sm:rounded-2xl",
280280
customQrLoading && !customQrError && "min-h-[220px] sm:min-h-[360px]"
281281
)}
282282
style={{
@@ -287,7 +287,7 @@ export function QRCodeDialog({ vault, onVaultUpdate }: QRCodeDialogProps) {
287287
<img
288288
src={customQrUrl}
289289
alt={`QR code for ${vault.name || 'vault'}`}
290-
className="block h-auto w-full max-w-[236px] object-contain sm:max-w-[390px]"
290+
className="mx-auto block h-auto w-full max-w-[236px] object-contain sm:max-w-[390px]"
291291
/>
292292
) : customQrLoading && !customQrError ? (
293293
<div className="flex flex-col items-center justify-center gap-3 text-center font-mono text-sm text-muted-foreground">
@@ -304,7 +304,7 @@ export function QRCodeDialog({ vault, onVaultUpdate }: QRCodeDialogProps) {
304304
size={fallbackQrSize}
305305
level="H"
306306
marginSize={2}
307-
bgColor="#ffffff"
307+
bgColor={QR_DOWNLOAD_BACKGROUND}
308308
fgColor={gradientColor}
309309
/>
310310
)}

0 commit comments

Comments
 (0)