import { HTMLProps } from "react"; import { Editable } from "./Editable"; /** * Controlled input component which displays an `input[type="text"]` in editing mode, and a `span` displaying the input in preview mode. */ export function EditableText(props: HTMLProps & { value: string }) { return ( } preview={ {props.value} } /> ) }