import React, { ReactNode } from "react"; import { useDialSchema } from "../DialProvider"; import type { DialCustomRenderFn, DialSchema } from "../types"; export interface DialCustomProps { schema: DialSchema; /** Render function with access to getValue/setValue context */ render?: DialCustomRenderFn; /** Direct ReactNode (no context access) */ children?: ReactNode; } /** * Custom component that renders user-provided React components * * Supports two modes: * 1. `render` function: Receives getValue/setValue context for dial integration * 2. `children`: Direct ReactNode for simple/static components * * @example * ```tsx * // Mode 1: Render function with context (recommended for dial integration) * const customRender = useMemo(() => ({ getValue, setValue }) => ( *