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