Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

add includeMargin to qr code

Steven Tey71f0f0dc2512
diff --git a/apps/web/ui/modals/link-qr-modal.tsx b/apps/web/ui/modals/link-qr-modal.tsx
index b3e3cc6d51..0c588342a4 100644
--- a/apps/web/ui/modals/link-qr-modal.tsx
+++ b/apps/web/ui/modals/link-qr-modal.tsx
@@ -88,6 +88,7 @@ export function QRCodePicker({
fgColor,
size: 1024,
level: "Q", // QR Code error correction level: https://blog.qrstuff.com/general/qr-code-error-correction
+ includeMargin: true,
...(showLogo && {
imageSettings: {
src:
@@ -126,14 +127,13 @@ export function QRCodePicker({
</div>
<div className="flex flex-col space-y-6 bg-gray-50 py-6 text-left">
- <div className="mx-auto rounded-lg border-2 border-gray-200 bg-white p-4">
+ <div className="mx-auto overflow-hidden rounded-lg border-2 border-gray-200 bg-white p-4">
<QRCodeSVG
value={qrData.value}
size={qrData.size / 8}
bgColor={qrData.bgColor}
fgColor={qrData.fgColor}
level={qrData.level}
- includeMargin={false}
{...(qrData.imageSettings && {
imageSettings: {
...qrData.imageSettings,
diff --git a/packages/ui/src/card-list/card-list-card.tsx b/packages/ui/src/card-list/card-list-card.tsx
index 660e3ae8b3..721d9fd404 100644
--- a/packages/ui/src/card-list/card-list-card.tsx
+++ b/packages/ui/src/card-list/card-list-card.tsx
@@ -52,6 +52,7 @@ export function CardListCard({
target = target.parentElement as HTMLElement, i++
) {
if (
+ target &&
["button", "a", "input", "textarea"].includes(
target.tagName.toLowerCase(),
)