The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
update tabselect
Steven Teyf79ae4087f0d
diff --git a/apps/web/ui/webhooks/webhook-header.tsx b/apps/web/ui/webhooks/webhook-header.tsxindex 1250f5af3a..a3440a20d9 100644--- a/apps/web/ui/webhooks/webhook-header.tsx+++ b/apps/web/ui/webhooks/webhook-header.tsx@@ -127,16 +127,19 @@ export default function WebhookHeader({ webhookId }: { webhookId: string }) {/></Popover></div>- <TabSelect- options={[- { id: "", label: "Webhook Logs" },- { id: "edit", label: "Update Details" },- ]}- selected={page}- onSelect={(id: "" | "edit") => {- router.push(`/${slug}/settings/webhooks/${webhookId}/${id}`);- }}- />+ <div className="-ml-1.5 border-b border-gray-200">+ <TabSelect+ options={[+ { id: "", label: "Webhook Logs" },+ { id: "edit", label: "Update Details" },+ ]}+ selected={page}+ onSelect={(id: "" | "edit") => {+ router.push(`/${slug}/settings/webhooks/${webhookId}/${id}`);+ }}+ className="gap-2"+ />+ </div></MaxWidthWrapper></>);diff --git a/packages/ui/src/tab-select.tsx b/packages/ui/src/tab-select.tsxindex 86017063a9..e589cad382 100644--- a/packages/ui/src/tab-select.tsx+++ b/packages/ui/src/tab-select.tsx@@ -6,15 +6,17 @@ export function TabSelect<T extends string>({options,selected,onSelect,+ className,}: {options: { id: T; label: string }[];selected: string | null;onSelect?: Dispatch<SetStateAction<T>> | ((id: T) => void);+ className?: string;}) {const layoutGroupId = useId();return (- <div className="flex text-sm">+ <div className={cn("flex text-sm", className)}><LayoutGroup id={layoutGroupId}>{options.map(({ id, label }) => (<div key={id} className="relative">@@ -22,7 +24,7 @@ export function TabSelect<T extends string>({type="button"onClick={() => onSelect?.(id)}className={cn(- "px-3 py-4 transition-colors duration-75",+ "p-4 transition-colors duration-75",id === selected? "text-black": "text-gray-400 hover:text-gray-500",