diff --git a/bun.lockb b/bun.lockb index f628cf9..9a1fbd5 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 9bf39e6..b36bd97 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@monaco-editor/react": "^4.6.0", "@next/env": "^14.2.13", "@radix-ui/react-checkbox": "^1.1.1", + "@radix-ui/react-dialog": "^1.1.2", "@radix-ui/react-dropdown-menu": "^2.1.1", "@radix-ui/react-icons": "^1.3.0", "@radix-ui/react-select": "^2.1.1", diff --git a/src/app/(private)/saved-themes/page.tsx b/src/app/(private)/saved-themes/page.tsx index e004f9b..298d984 100644 --- a/src/app/(private)/saved-themes/page.tsx +++ b/src/app/(private)/saved-themes/page.tsx @@ -10,7 +10,7 @@ export default async function SavedThemesPage() { auth().protect() return ( -
+
{themes.length === 0 ? (

No Saved Themes

diff --git a/src/app/discover/page.tsx b/src/app/discover/page.tsx index 80fca5c..5de385a 100644 --- a/src/app/discover/page.tsx +++ b/src/app/discover/page.tsx @@ -7,13 +7,15 @@ export default async function DiscoverPage() { const themes = await getPublicThemes() return (
-
+
-

Discover new themes

-

+

+ Discover new themes +

+

made by the community

diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 9c52f8b..aa27783 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -9,7 +9,7 @@ import { auth } from '@clerk/nextjs/server' import { dark } from '@clerk/themes' import { Toaster } from '@/components/ui/toaster' -import Navigation from '@/components/Navigation' +import { Navigation } from '@/components/Navigation' import { ThemeProvider as ThemeProviderContext } from '@/contexts/ThemeContext' import { Analytics } from '@vercel/analytics/react' diff --git a/src/app/page.tsx b/src/app/page.tsx index e7e1828..7c62499 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -24,7 +24,7 @@ export default function Home() { Visual Studio Code.

-
+
Discover Themes diff --git a/src/components/Discover.tsx b/src/components/Discover.tsx index f8a09a5..b76cc0e 100644 --- a/src/components/Discover.tsx +++ b/src/components/Discover.tsx @@ -14,7 +14,7 @@ export default function Discover({ themes }: { themes: SavedTheme[] }) {
-
+
{themes.map((theme) => ( { return ( - + + ) +} + +interface MobileLinkProps extends React.PropsWithChildren { + href: string + onOpenChange?: (open: boolean) => void + className?: string +} + +function MobileLink({ + href, + onOpenChange, + className, + children, +}: MobileLinkProps) { + const pathname = usePathname() + const isActive = pathname === href + + return ( + onOpenChange?.(false)} + className={cn( + className, + 'text-foreground/70 transition-colors hover:text-foreground', + isActive && 'text-foreground' + )} + > + {children} + ) } -export default Navigation diff --git a/src/components/SavedThemes.tsx b/src/components/SavedThemes.tsx index e165c5e..4405f34 100644 --- a/src/components/SavedThemes.tsx +++ b/src/components/SavedThemes.tsx @@ -26,7 +26,7 @@ export function SavedThemesContent({
-
+
{themes.map((theme) => ( = ({ title, isThemeColors }) => { Unlock All
-
+
{Object.entries(displayColors).map(([key, value]) => (

, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SheetOverlay.displayName = SheetPrimitive.Overlay.displayName + +const sheetVariants = cva( + "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out", + { + variants: { + side: { + top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top", + bottom: + "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom", + left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm", + right: + "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm", + }, + }, + defaultVariants: { + side: "right", + }, + } +) + +interface SheetContentProps + extends React.ComponentPropsWithoutRef, + VariantProps {} + +const SheetContent = React.forwardRef< + React.ElementRef, + SheetContentProps +>(({ side = "right", className, children, ...props }, ref) => ( + + + + + + Close + + {children} + + +)) +SheetContent.displayName = SheetPrimitive.Content.displayName + +const SheetHeader = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+) +SheetHeader.displayName = "SheetHeader" + +const SheetFooter = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+) +SheetFooter.displayName = "SheetFooter" + +const SheetTitle = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SheetTitle.displayName = SheetPrimitive.Title.displayName + +const SheetDescription = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SheetDescription.displayName = SheetPrimitive.Description.displayName + +export { + Sheet, + SheetPortal, + SheetOverlay, + SheetTrigger, + SheetClose, + SheetContent, + SheetHeader, + SheetFooter, + SheetTitle, + SheetDescription, +}