From 5bd5e15aa5ce787c434740470791cc44b150fc29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Kir=C3=A1ly?= Date: Fri, 13 Dec 2024 16:55:00 +0100 Subject: [PATCH] Sidebar redesign --- .../frontend/src/components/layout/header.tsx | 24 +++-------- .../src/components/layout/sidebar.tsx | 43 +++++++++++++------ .../src/components/ui/action-button.tsx | 32 ++++++++++++++ apps/frontend/src/components/ui/button.tsx | 3 ++ 4 files changed, 72 insertions(+), 30 deletions(-) create mode 100644 apps/frontend/src/components/ui/action-button.tsx diff --git a/apps/frontend/src/components/layout/header.tsx b/apps/frontend/src/components/layout/header.tsx index 537fc8b..c1a80a7 100644 --- a/apps/frontend/src/components/layout/header.tsx +++ b/apps/frontend/src/components/layout/header.tsx @@ -1,11 +1,11 @@ 'use client'; -import { motion } from 'framer-motion'; import { GeistSans } from 'geist/font/sans'; import { ChevronRight } from 'lucide-react'; import Link from 'next/link'; import { ThemeToggle } from '@/components/layout/theme-toggle'; +import ActionButton from '@/components/ui/action-button'; import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; import { Button } from '@/components/ui/button'; import { @@ -31,22 +31,12 @@ export function Header() {
- - - + } + variant='outline' + className='h-10 rounded-full font-light hover:bg-transparent' + />
diff --git a/apps/frontend/src/components/layout/sidebar.tsx b/apps/frontend/src/components/layout/sidebar.tsx index 40daccf..8761beb 100644 --- a/apps/frontend/src/components/layout/sidebar.tsx +++ b/apps/frontend/src/components/layout/sidebar.tsx @@ -1,20 +1,31 @@ -import { BarChart3, CalendarPlus, Heart, KeyboardMusic, ListMusic, MicVocal, Radio } from 'lucide-react'; +import { + BarChart3, + BookAudio, + CalendarPlus, + Heart, + KeyboardMusic, + ListMusic, + MicVocal, + Plus, + Radio, +} from 'lucide-react'; import Link from 'next/link'; +import ActionButton from '@/components/ui/action-button'; import { Button } from '@/components/ui/button'; export function Sidebar() { return (
-
+
- - - +

For Members

- -
-
- +
+ } variant='ghostPrimary' /> +
+
); } diff --git a/apps/frontend/src/components/ui/action-button.tsx b/apps/frontend/src/components/ui/action-button.tsx new file mode 100644 index 0000000..19c8fbf --- /dev/null +++ b/apps/frontend/src/components/ui/action-button.tsx @@ -0,0 +1,32 @@ +'use client'; + +import { motion } from 'framer-motion'; +import React from 'react'; + +import { Button, ButtonProps } from '@/components/ui/button'; +import { cn } from '@/lib/utils'; + +interface ActionButtonProps extends ButtonProps { + text: string; + icon: React.ReactNode; +} + +const ActionButton: React.FC = ({ text, variant, icon, className }) => { + return ( + + + + ); +}; + +export default ActionButton; diff --git a/apps/frontend/src/components/ui/button.tsx b/apps/frontend/src/components/ui/button.tsx index 8c5cab9..b78aa38 100644 --- a/apps/frontend/src/components/ui/button.tsx +++ b/apps/frontend/src/components/ui/button.tsx @@ -15,6 +15,9 @@ const buttonVariants = cva( secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80', ghost: 'hover:bg-accent hover:text-accent-foreground', link: 'text-primary underline-offset-4 hover:underline', + blast: 'hover:text-primary hover:bg-gradient-to-r from-orange-500/20 via-orange-500/10 to-transparent', + blastActive: 'text-primary bg-gradient-to-r from-orange-500/20 via-orange-500/10 to-transparent', + ghostPrimary: 'text-primary bg-orange-500/10 hover:bg-orange-500/20', }, size: { default: 'h-9 px-4 py-2',