@activecollab/components
Version:
ActiveCollab Components
18 lines • 949 B
TypeScript
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?: () => 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;
/** Children content to display */
children?: React.ReactNode;
}
export declare const EditableText: React.ForwardRefExoticComponent<EditableTextInterface & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=EditableText.d.ts.map