fix: Mobile

This commit is contained in:
Sahaj Jain
2025-04-17 22:53:55 +05:30
parent eae9a3a1bb
commit 2232aecde3
2 changed files with 10 additions and 15 deletions
+9 -14
View File
@@ -73,7 +73,7 @@ const Editor: React.FC<EditorProps> = ({ config }) => {
{/* Mobile Layout */}
<div className="h-full md:hidden">
<Tabs defaultValue="controls" className="h-full">
<TabsList className="w-full">
<TabsList className="w-full rounded-none">
<TabsTrigger value="controls" className="flex-1">
<Sliders className="h-4 w-4 mr-2" />
Controls
@@ -81,21 +81,16 @@ const Editor: React.FC<EditorProps> = ({ config }) => {
<TabsTrigger value="preview" className="flex-1">
Preview
</TabsTrigger>
<TabsTrigger value="code" className="flex-1">
Code
</TabsTrigger>
</TabsList>
<TabsContent value="controls" className="h-[calc(100%-2.5rem)]">
<div className="h-full p-4">
<Controls
styles={styles}
onChange={handleStyleChange}
currentMode={themeState.currentMode}
/>
</div>
<TabsContent value="controls" className="h-[calc(100%-2.5rem)] mt-0">
<Controls
styles={styles}
onChange={handleStyleChange}
currentMode={themeState.currentMode}
/>
</TabsContent>
<TabsContent value="preview" className="h-[calc(100%-2.5rem)]">
<div className="h-full p-4">
<TabsContent value="preview" className="h-[calc(100%-2.5rem)] mt-0">
<div className="h-full flex flex-col">
<Preview styles={styles} currentMode={themeState.currentMode} />
</div>
</TabsContent>
+1 -1
View File
@@ -16,7 +16,7 @@ export function Header() {
return (
<header className="border-b">
<div className="px-2 md:px-4 py-4 flex items-center gap-2 justify-between">
<div className="p-4 flex items-center gap-2 justify-between">
<div className="flex items-center gap-1">
<Link href="/" className="flex items-center gap-2">
<Logo className="size-6" title="tweakcn" />