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.

#277 (fix) responsive and button icon issue

desyed9e6787d0f1ad
diff --git a/app/ui/home/demo/index.tsx b/app/ui/home/demo/index.tsx
index 20495064ae..aa753e9db9 100644
--- a/app/ui/home/demo/index.tsx
+++ b/app/ui/home/demo/index.tsx
@@ -13,6 +13,7 @@ import useLocalStorage from "#/lib/hooks/use-local-storage";
import { SimpleLinkProps } from "#/lib/types";
import { toast } from "sonner";
import { createLink } from "./action";
+import EnterOutlinedIcon from "#/ui/icons/enter-outlined";
export default function Demo() {
const formRef = useRef<HTMLFormElement>(null);
@@ -59,7 +60,7 @@ export default function Demo() {
Shorten your link
</div>
<div className="absolute inset-y-0 right-0 my-1.5 mr-1.5 flex w-10 cursor-not-allowed items-center justify-center rounded border border-gray-200 font-sans text-sm font-medium text-gray-400">
- <p>↵</p>
+ <EnterOutlinedIcon/>
</div>
</div>
</Tooltip>
@@ -143,13 +144,12 @@ const FormButton = () => {
<button
type="submit"
disabled={pending}
- className={`${
- pending
+ className={`${pending
? "cursor-not-allowed bg-gray-100"
: "hover:border-gray-700 hover:text-gray-700 peer-focus:text-gray-700"
- } absolute inset-y-0 right-0 my-1.5 mr-1.5 flex w-10 items-center justify-center rounded border border-gray-200 font-sans text-sm font-medium text-gray-400`}
+ } absolute inset-y-0 right-0 my-1.5 mr-1.5 flex w-10 items-center justify-center rounded border border-gray-200 font-sans text-sm font-medium text-gray-400`}
>
- {pending ? <LoadingSpinner className="h-4 w-4" /> : <p>↵</p>}
+ {pending ? <LoadingSpinner className="h-4 w-4" /> : <EnterOutlinedIcon/>}
</button>
);
};
diff --git a/app/ui/home/link-card.tsx b/app/ui/home/link-card.tsx
index 07bca49767..8dffed87b0 100644
--- a/app/ui/home/link-card.tsx
+++ b/app/ui/home/link-card.tsx
@@ -153,7 +153,7 @@ export default function LinkCard({
height={20}
/>
<div>
- <div className="mb-1 flex items-center space-x-2">
+ <div className="mb-1 flex items-center space-x-1">
<a
className="font-semibold text-blue-800"
href={linkConstructor({ key })}
diff --git a/app/ui/home/placeholder-card.tsx b/app/ui/home/placeholder-card.tsx
index afd4620edf..fe6e1142ea 100644
--- a/app/ui/home/placeholder-card.tsx
+++ b/app/ui/home/placeholder-card.tsx
@@ -14,7 +14,7 @@ export default function PlaceholderCard() {
<div className="h-6 w-6 rounded-full bg-gray-200" />
<div className="h-6 w-20 rounded-md bg-gray-200" />
</div>
- <div className="h-4 w-72 rounded-md bg-gray-200" />
+ <div className="h-4 rounded-md bg-gray-200" />
</div>
</motion.li>
);
diff --git a/app/ui/icons/enter-outlined.tsx b/app/ui/icons/enter-outlined.tsx
new file mode 100644
index 0000000000..5bc3dab7d1
--- /dev/null
+++ b/app/ui/icons/enter-outlined.tsx
@@ -0,0 +1,12 @@
+const EnterOutlinedIcon = () => (
+ <svg fill="currentColor" width="1em" height="1em" viewBox="0 0 24 24" version="1.1">
+ <g id="🔍-System-Icons" stroke="none" stroke-width="1" fill="currentColor" fill-rule="evenodd">
+ <g id="ic_fluent_arrow_enter_24_filled" fill="currentColor" fill-rule="nonzero">
+ <path d="M21,4 C21.5128358,4 21.9355072,4.38604019 21.9932723,4.88337887 L22,5 L22,11.5 C22,13.3685634 20.5357224,14.8951264 18.6920352,14.9948211 L18.5,15 L5.415,15 L8.70710678,18.2928932 C9.06759074,18.6533772 9.09532028,19.2206082 8.79029539,19.6128994 L8.70710678,19.7071068 C8.34662282,20.0675907 7.77939176,20.0953203 7.38710056,19.7902954 L7.29289322,19.7071068 L2.29289322,14.7071068 C2.25749917,14.6717127 2.22531295,14.6343256 2.19633458,14.5953066 L2.12467117,14.4840621 L2.12467117,14.4840621 L2.07122549,14.371336 L2.07122549,14.371336 L2.03584514,14.265993 L2.03584514,14.265993 L2.0110178,14.1484669 L2.0110178,14.1484669 L2.00397748,14.0898018 L2.00397748,14.0898018 L2,14 L2.00278786,13.9247615 L2.00278786,13.9247615 L2.02024007,13.7992742 L2.02024007,13.7992742 L2.04973809,13.6878575 L2.04973809,13.6878575 L2.09367336,13.5767785 L2.09367336,13.5767785 L2.14599545,13.4792912 L2.14599545,13.4792912 L2.20970461,13.3871006 L2.20970461,13.3871006 L2.29289322,13.2928932 L2.29289322,13.2928932 L7.29289322,8.29289322 C7.68341751,7.90236893 8.31658249,7.90236893 8.70710678,8.29289322 C9.06759074,8.65337718 9.09532028,9.22060824 8.79029539,9.61289944 L8.70710678,9.70710678 L5.415,13 L18.5,13 C19.2796961,13 19.9204487,12.4051119 19.9931334,11.64446 L20,11.5 L20,5 C20,4.44771525 20.4477153,4 21,4 Z" id="🎨-Color">
+ </path>
+ </g>
+ </g>
+ </svg>
+ );
+
+ export default EnterOutlinedIcon;
\ No newline at end of file
diff --git a/components/app/links/link-card-placeholder.tsx b/components/app/links/link-card-placeholder.tsx
index 15acb8cd1b..3b5466fb1b 100644
--- a/components/app/links/link-card-placeholder.tsx
+++ b/components/app/links/link-card-placeholder.tsx
@@ -9,7 +9,7 @@ export default function LinkCardPlaceholder() {
<div className="h-5 w-5 animate-pulse rounded-full bg-gray-200" />
<div className="h-5 w-20 animate-pulse rounded-md bg-gray-200" />
</div>
- <div className="h-4 w-72 animate-pulse rounded-md bg-gray-200" />
+ <div className="h-4 animate-pulse rounded-md bg-gray-200" />
</div>
</li>
);