@wix/design-system
Version:
@wix/design-system
24 lines (21 loc) • 915 B
TypeScript
import * as React from 'react';
export interface EditableTitleProps {
dataHook?: string;
/** Defines a text value that is shown initially */
initialValue?: string;
/** Defines text value that is shown when the title is empty. When clicked this value will become a default 'value'
* @default ''
*/
defaultValue?: string;
/** Triggers function when a user is done with editing the title */
onSubmit?: (value: string) => void;
/** Sets the max number of characters that a user can type in the title */
maxLength?: number;
/** Sets focus on the title as soon as the component is rendered (on mount) */
autoFocus?: boolean;
/** Triggers function when the title is being edited */
onChange?: React.ChangeEventHandler<HTMLInputElement>;
/** Sets the controlled value of the input */
value?: string;
}
export default class EditableTitle extends React.Component<EditableTitleProps> {}