Skip to content

Commit ac78fa9

Browse files
committed
feat(editor-standalone): theme switcher and header
1 parent 128f958 commit ac78fa9

4 files changed

Lines changed: 23 additions & 14 deletions

File tree

apps/editor-standalone/src/app/layout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { EffectorNext } from '@effector/next'
2+
import { ThemeProvider } from '@repo/ui-kit/components/theme'
23
import type { Metadata } from 'next'
34
import { JetBrains_Mono } from 'next/font/google'
45
import type { FC, ReactNode } from 'react'
@@ -15,9 +16,11 @@ const monoFont = JetBrains_Mono({
1516

1617
const RootLayout: FC<{ children: ReactNode }> = ({ children }) => {
1718
return (
18-
<html lang="en" className="dark">
19+
<html lang="en" suppressHydrationWarning>
1920
<body className={monoFont.className}>
20-
<EffectorNext>{children}</EffectorNext>
21+
<ThemeProvider>
22+
<EffectorNext>{children}</EffectorNext>
23+
</ThemeProvider>
2124
</body>
2225
</html>
2326
)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Heading } from '@repo/ui-kit/components/heading'
2+
import { ThemeSwitcher } from '@repo/ui-kit/components/theme'
3+
import type { FC } from 'react'
4+
5+
export const EditorHeader: FC = () => {
6+
return (
7+
<div className="flex items-center gap-2 border-b-2 p-2">
8+
<div className="grow" />
9+
<Heading.Root align="end">
10+
<Heading.SuperTitle>kepvox</Heading.SuperTitle>
11+
<Heading.Title>editor</Heading.Title>
12+
</Heading.Root>
13+
<ThemeSwitcher variant="outline" size="lg" />
14+
</div>
15+
)
16+
}

apps/editor-standalone/src/screens/editor/ui/editor-menubar.tsx

Lines changed: 0 additions & 10 deletions
This file was deleted.

apps/editor-standalone/src/screens/editor/ui/editor-screen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
import { Editor } from '@repo/editor'
44
import type { FC } from 'react'
55
import { defaultProject } from '../model'
6-
import { EditorMenubar } from './editor-menubar'
6+
import { EditorHeader } from './editor-header'
77

88
export const EditorScreen: FC = () => {
99
return (
1010
<div className="flex h-screen w-screen flex-col">
11-
<EditorMenubar />
11+
<EditorHeader />
1212
<Editor initialProject={defaultProject} />
1313
</div>
1414
)

0 commit comments

Comments
 (0)