Skip to content

Commit

Permalink
fix: theme
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Sep 21, 2024
1 parent a8496b4 commit 37d5697
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 895 deletions.
5 changes: 4 additions & 1 deletion apps/www/src/app/_components/home-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { parseAsBoolean, useQueryState } from 'nuqs';

import { BlockPreview } from '@/components/block-preview';
import { settingsStore } from '@/components/context/settings-store';
import { ThemeWrapper } from '@/components/theme-wrapper';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
import { Button } from '@/registry/default/plate-ui/button';

Expand Down Expand Up @@ -68,7 +69,9 @@ export default function HomeTabs() {
</Button>

<TabsContent className="pt-2" value="playground">
<BlockPreview className="max-w-[1336px]" />
<ThemeWrapper>
<BlockPreview className="max-w-[1336px]" />
</ThemeWrapper>
</TabsContent>

<TabsContent className="pt-2" value="installation">
Expand Down
6 changes: 2 additions & 4 deletions apps/www/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type { Metadata, Viewport } from 'next';

import { cn } from '@udecode/cn';

import { Body } from '@/components/body';
import { Providers } from '@/components/context/providers';
import { SiteFooter } from '@/components/site-footer';
import { SiteHeader } from '@/components/site-header';
Expand Down Expand Up @@ -86,12 +85,11 @@ export default function RootLayout({ children }: RootLayoutProps) {
return (
<html lang="en" suppressHydrationWarning>
<head />
<Body
<body
className={cn(
'min-h-screen bg-background font-sans antialiased',
fontSans.variable
)}
defaultTheme="slate"
suppressHydrationWarning
>
<Providers>
Expand All @@ -106,7 +104,7 @@ export default function RootLayout({ children }: RootLayoutProps) {
<TailwindIndicator />

<Toaster />
</Body>
</body>
</html>
);
}
43 changes: 0 additions & 43 deletions apps/www/src/components/body.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions apps/www/src/components/customizer-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';

import { settingsStore } from './context/settings-store';
import { PluginsTabContent } from './plugins-tab-content';
import { ThemesTabContent } from './themes-tab-content';
import { ThemeCustomizer } from './theme-customizer';
import { Tabs, TabsContent, TabsList, TabsTrigger } from './ui/tabs';

export function CustomizerTabs() {
Expand Down Expand Up @@ -33,7 +33,7 @@ export function CustomizerTabs() {
className="h-[calc(85vh-90px)] overflow-y-auto overflow-x-hidden overscroll-contain pt-2 md:h-[calc(100vh-64px)]"
value="themes"
>
<ThemesTabContent />
<ThemeCustomizer />
</TabsContent>
</Tabs>
</div>
Expand Down
Loading

0 comments on commit 37d5697

Please sign in to comment.