UNPKG

@activecollab/components

Version:

ActiveCollab Components

20 lines 1.09 kB
import React, { ChangeEvent } from "react"; import { EditableContentInterface } from "../EditableContent/EditableContent"; export interface EditableTextInterface extends EditableContentInterface { /** Value to display. */ value?: string | null; /** Optional callback called on enter, click outside and tab. */ onSave?: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void; /** Optional callback called on input reset. */ onCancel?: (e: any) => void; /** If true, setting empty value will save it, instead of revert to previous value. */ allowEmptyString?: boolean; /** If true, shows a textarea instead of input for multiline editing. */ multiline?: boolean; /** If true, Cmd/Ctrl+Enter commits a multiline edit (plain Enter keeps inserting a newline). */ submitOnMetaEnter?: boolean; /** Children content to display */ children?: React.ReactNode; } export declare const EditableText: React.ForwardRefExoticComponent<EditableTextInterface & React.RefAttributes<HTMLDivElement>>; //# sourceMappingURL=EditableText.d.ts.map