import { Input, Textarea } from "@mantine/core" import type { ReactNode } from "react" import RichCodeEditor from "@/components/code/RichCodeEditor" import { useMobile } from "@/hooks/useMobile" interface CodeEditorProps { label?: ReactNode description?: ReactNode language: "css" | "javascript" value?: string onChange: (value: string | undefined) => void } export function CodeEditor(props: Readonly) { const mobile = useMobile() return mobile ? ( // monaco mobile support is poor, fallback to textarea