diff --git a/src/index.css b/src/index.css index 4da75e69..1eb2ad03 100644 --- a/src/index.css +++ b/src/index.css @@ -251,22 +251,6 @@ max-height: 100dvh; } - /* Mobile navigation button styles - text/icon highlighting only */ - .mobile-nav-button, - .mobile-nav-button:hover, - .mobile-nav-button:active, - .mobile-nav-button-active, - .mobile-nav-button-active:hover, - .mobile-nav-button-active:active { - background-color: transparent !important; - } - - .mobile-nav-button-active, - .mobile-nav-button-active:hover, - .mobile-nav-button-active:active { - color: hsl(var(--primary)) !important; - } - pre.shiki { background-color: transparent !important; } diff --git a/src/pages/ProjectView.tsx b/src/pages/ProjectView.tsx index d441db1a..cbd302ae 100644 --- a/src/pages/ProjectView.tsx +++ b/src/pages/ProjectView.tsx @@ -24,6 +24,7 @@ import { useBuildProject } from '@/hooks/useBuildProject'; import { useIsProjectPreviewable } from '@/hooks/useIsProjectPreviewable'; import { useConsoleError } from '@/hooks/useConsoleError'; import { useAutoBuild } from '@/hooks/useAutoBuild'; +import { cn } from '@/lib/utils'; export function ProjectView() { const { projectId } = useParams<{ projectId: string }>(); @@ -265,7 +266,7 @@ export function ProjectView() { variant="ghost" size="sm" onClick={() => setMobileView('chat')} - className={`flex-1 rounded-none mobile-nav-button ${mobileView === 'chat' ? 'mobile-nav-button-active' : ''}`} + className={cn("flex-1 rounded-none mobile-nav-button", { "text-primary": mobileView === 'chat' })} disabled={!project} > @@ -276,7 +277,7 @@ export function ProjectView() { variant="ghost" size="sm" onClick={() => setMobileView('preview')} - className={`flex-1 rounded-none mobile-nav-button ${mobileView === 'preview' ? 'mobile-nav-button-active' : ''}`} + className={cn("flex-1 rounded-none mobile-nav-button", { "text-primary": mobileView === 'preview' })} disabled={!project} > @@ -287,7 +288,7 @@ export function ProjectView() { variant="ghost" size="sm" onClick={() => setMobileView('code')} - className={`flex-1 rounded-none mobile-nav-button ${mobileView === 'code' ? 'mobile-nav-button-active' : ''}`} + className={cn("flex-1 rounded-none mobile-nav-button", { "text-primary": mobileView === 'code' })} disabled={!project} >