From 23af17df5f32bd179ccbed04539bb06de3ee70d5 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 01:43:00 +0200 Subject: [PATCH] feat: add Tabs component with Radix UI integration --- src/app/settings/page.tsx | 10 ++++ src/components/ui/tabs.tsx | 66 +++++++++++++++++++++++++ src/components/user/redirect-button.tsx | 16 ++++++ 3 files changed, 92 insertions(+) create mode 100644 src/app/settings/page.tsx create mode 100644 src/components/ui/tabs.tsx create mode 100644 src/components/user/redirect-button.tsx diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx new file mode 100644 index 0000000..8d31232 --- /dev/null +++ b/src/app/settings/page.tsx @@ -0,0 +1,10 @@ +import { RedirectButton } from '@/components/user/redirect-button'; + +export default function Home() { + return ( +
+

Settings

+ +
+ ); +} diff --git a/src/components/ui/tabs.tsx b/src/components/ui/tabs.tsx new file mode 100644 index 0000000..497ba5e --- /dev/null +++ b/src/components/ui/tabs.tsx @@ -0,0 +1,66 @@ +"use client" + +import * as React from "react" +import * as TabsPrimitive from "@radix-ui/react-tabs" + +import { cn } from "@/lib/utils" + +function Tabs({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function TabsList({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function TabsTrigger({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function TabsContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { Tabs, TabsList, TabsTrigger, TabsContent } diff --git a/src/components/user/redirect-button.tsx b/src/components/user/redirect-button.tsx new file mode 100644 index 0000000..c4bf997 --- /dev/null +++ b/src/components/user/redirect-button.tsx @@ -0,0 +1,16 @@ +import { Button } from '../ui/button'; +import Link from 'next/link'; + +export function RedirectButton({ + redirectUrl, + buttonText, +}: { + redirectUrl: string; + buttonText: string; +}) { + return ( + + + + ); +}