mirror of
https://github.com/jnsahaj/tweakcn.git
synced 2026-09-01 15:37:45 +08:00
fix: Mobile
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user