22
33import { EditorContent } from "@tiptap/react"
44import type { ComponentProps } from "react"
5-
6- import type { VariantProps } from "../../../shared"
7- import { cx } from "../../../shared"
8- import { proseVariants } from "../../../typography/Prose/Prose.variants"
9- import type { SeriesProps } from "../../../ui/Stack"
10- import { Series } from "../../../ui/Stack"
5+ import { type VariantProps , cx } from "~/shared/cva"
6+ import { proseVariants } from "~/typography/Prose/Prose.variants"
7+ import { Stack } from "~/ui/Stack"
118
129import { editorContentVariants , editorMenuVariants , editorVariants } from "./Editor.variants"
1310
14- export type EditorProps = ComponentProps < typeof EditorContent > & VariantProps < typeof editorVariants >
11+ type EditorProps = ComponentProps < typeof EditorContent > & VariantProps < typeof editorVariants >
1512
1613const EditorRoot = ( { className, error, plain, ...rest } : EditorProps ) => {
1714 return < EditorContent className = { cx ( editorVariants ( { error, plain, className } ) ) } { ...rest } />
1815}
1916
20- type EditorMenuProps = SeriesProps & VariantProps < typeof editorMenuVariants >
17+ type EditorMenuProps = ComponentProps < typeof Stack > & VariantProps < typeof editorMenuVariants >
2118
22- export const EditorMenu = ( { className, plain, ...rest } : EditorMenuProps ) => {
23- return < Series size = "sm" className = { cx ( editorMenuVariants ( { plain, className } ) ) } { ...rest } />
19+ const EditorMenu = ( { className, plain, ...rest } : EditorMenuProps ) => {
20+ return < Stack size = "sm" className = { cx ( editorMenuVariants ( { plain, className } ) ) } { ...rest } />
2421}
2522
26- export const Editor = Object . assign ( EditorRoot , {
23+ const Editor = Object . assign ( EditorRoot , {
2724 Menu : EditorMenu ,
2825 ContentClass : ( { compact, plain } : VariantProps < typeof editorContentVariants > ) =>
2926 cx (
@@ -34,3 +31,5 @@ export const Editor = Object.assign(EditorRoot, {
3431 } ) ,
3532 ) ,
3633} )
34+
35+ export { Editor , EditorMenu }
0 commit comments