The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix a few
Steven Tey36ff41332ec5
diff --git a/apps/web/ui/analytics/events/empty-state.tsx b/apps/web/ui/analytics/events/empty-state.tsxindex f9880b6257..0afee8290d 100644--- a/apps/web/ui/analytics/events/empty-state.tsx+++ b/apps/web/ui/analytics/events/empty-state.tsx@@ -1,5 +1,7 @@-import { Button } from "@dub/ui";+import { buttonVariants } from "@dub/ui";import { InvoiceDollar } from "@dub/ui/src/icons";+import { cn } from "@dub/utils";+import Link from "next/link";export default function EmptyState() {return (@@ -15,16 +17,18 @@ export default function EmptyState() {top-converting leads and best-selling products.</p><div className="mt-8">- <Button- onClick={() => window.open("https://dub.co/docs", "_blank")}- className="h-8"- variant="secondary"- text={- <span className="bg-gradient-to-r from-violet-600 to-pink-600 bg-clip-text text-transparent">- Enable Sales Analytics- </span>- }- />+ <Link+ href="https://dub.co/docs"+ target="_blank"+ className={cn(+ buttonVariants({ variant: "secondary" }),+ "flex h-8 items-center justify-center gap-2 rounded-md border px-4 text-sm transition-all",+ )}+ >+ <span className="bg-gradient-to-r from-violet-600 to-pink-600 bg-clip-text text-transparent">+ Enable Sales Analytics+ </span>+ </Link></div></div>);diff --git a/apps/web/ui/domains/domain-card.tsx b/apps/web/ui/domains/domain-card.tsxindex a82f0acbd5..0253216141 100644--- a/apps/web/ui/domains/domain-card.tsx+++ b/apps/web/ui/domains/domain-card.tsx@@ -243,16 +243,14 @@ export default function DomainCard({ props }: { props: DomainProps }) {openPopover={openPopover}setOpenPopover={setOpenPopover}>- <div>- <Button- variant="secondary"- className="px-2"- icon={<ThreeDots className="h-5 w-5" />}- onClick={() => {- setOpenPopover(!openPopover);- }}- />- </div>+ <Button+ variant="secondary"+ className="px-2"+ icon={<ThreeDots className="h-5 w-5" />}+ onClick={() => {+ setOpenPopover(!openPopover);+ }}+ /></Popover></div></div>diff --git a/apps/web/ui/modals/add-edit-link-modal/preview.tsx b/apps/web/ui/modals/add-edit-link-modal/preview.tsxindex 8e0388662f..69e652711e 100644--- a/apps/web/ui/modals/add-edit-link-modal/preview.tsx+++ b/apps/web/ui/modals/add-edit-link-modal/preview.tsx@@ -287,14 +287,12 @@ const ImagePreview = ({openPopover={openPopover}setOpenPopover={setOpenPopover}>- <div className="absolute right-2 top-2">- <Button- variant="secondary"- onClick={() => setOpenPopover(!openPopover)}- icon={<Edit2 className="h-3 w-3" />}- className="h-8 w-8 rounded-md p-0 transition-all hover:bg-gray-100"- />- </div>+ <Button+ variant="secondary"+ onClick={() => setOpenPopover(!openPopover)}+ icon={<Edit2 className="h-3 w-3" />}+ className="absolute right-2 top-2 h-8 w-8 rounded-md p-0 transition-all hover:bg-gray-100"+ /></Popover><inputkey={image}diff --git a/packages/ui/src/button.tsx b/packages/ui/src/button.tsxindex c72798dd4e..8548c893fc 100644--- a/packages/ui/src/button.tsx+++ b/packages/ui/src/button.tsx@@ -4,7 +4,7 @@ import { ReactNode, forwardRef } from "react";import { LoadingSpinner } from "./icons";import { Tooltip } from "./tooltip";-const buttonVariants = cva("", {+export const buttonVariants = cva("", {variants: {variant: {primary:@@ -88,7 +88,7 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(// if onClick is passed, it's a "button" type, otherwise it's being used in a form, hence "submit"type={props.onClick ? "button" : "submit"}className={cn(- "group flex h-10 w-full items-center justify-center space-x-2 rounded-md border px-4 text-sm transition-all",+ "group flex h-10 w-full items-center justify-center gap-2 rounded-md border px-4 text-sm transition-all",props.disabled || loading? "cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400": buttonVariants({ variant }),