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 right element for button

Steven Teyfe0f10ef8397
diff --git a/apps/web/ui/analytics/analytics-card.tsx b/apps/web/ui/analytics/analytics-card.tsx
index eeaf782269..85e5efc691 100644
--- a/apps/web/ui/analytics/analytics-card.tsx
+++ b/apps/web/ui/analytics/analytics-card.tsx
@@ -2,6 +2,7 @@ import { EventType } from "@/lib/analytics/types";
import { Button, Modal, Popover, TabSelect, useMediaQuery } from "@dub/ui";
import { CursorRays, InvoiceDollar, UserCheck } from "@dub/ui/src/icons";
import { cn } from "@dub/utils";
+import { ChevronsUpDown } from "lucide-react";
import {
Dispatch,
ReactNode,
@@ -93,6 +94,12 @@ export function AnalyticsCard<T extends string>({
variant="outline"
icon={<SelectedTabIcon className="size-4" />}
text={selectedTab.label}
+ right={
+ <ChevronsUpDown
+ className="size-4 shrink-0 text-gray-400"
+ aria-hidden="true"
+ />
+ }
/>
</Popover>
) : (
diff --git a/apps/web/ui/layout/sidebar/news.tsx b/apps/web/ui/layout/sidebar/news.tsx
index 645ea6212f..dd518d2a37 100644
--- a/apps/web/ui/layout/sidebar/news.tsx
+++ b/apps/web/ui/layout/sidebar/news.tsx
@@ -246,6 +246,7 @@ function NewsCard({
src={image}
alt=""
fill
+ sizes="10vw"
className="rounded object-cover object-center"
draggable={false}
/>
diff --git a/packages/ui/src/button.tsx b/packages/ui/src/button.tsx
index 77888c57c0..b47702e2d3 100644
--- a/packages/ui/src/button.tsx
+++ b/packages/ui/src/button.tsx
@@ -13,7 +13,7 @@ export const buttonVariants = cva("transition-all", {
"border-gray-200 bg-white text-gray-900 hover:bg-gray-50 focus-visible:border-gray-500 outline-none",
"data-[state=open]:border-gray-500 data-[state=open]:ring-4 data-[state=open]:ring-gray-200",
),
- outline: "border-transparent text-gray-500 duration-75 hover:bg-gray-100",
+ outline: "border-transparent text-neutral-600 hover:bg-neutral-100",
success:
"border-blue-500 bg-blue-500 text-white hover:bg-blue-600 hover:ring-4 hover:ring-blue-100",
danger:
@@ -35,6 +35,7 @@ export interface ButtonProps
loading?: boolean;
icon?: ReactNode;
shortcut?: string;
+ right?: ReactNode;
disabledTooltip?: string | ReactNode;
}
@@ -49,6 +50,7 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(
icon,
shortcut,
disabledTooltip,
+ right,
...props
}: ButtonProps,
forwardedRef,
@@ -140,6 +142,7 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(
{shortcut}
</kbd>
)}
+ {right}
</button>
);
},