matrix-react-sdk
Version:
SDK for matrix.org using React
35 lines (34 loc) • 980 B
TypeScript
import React from "react";
import { TranslationKey } from "../../../languageHandler";
import { IFieldState, IValidationResult } from "../elements/Validation";
interface IProps {
title: string;
description: React.ReactNode;
value: string;
placeholder?: string;
button?: string;
busyMessage: TranslationKey;
focus: boolean;
hasCancel: boolean;
validator?: (fieldState: IFieldState) => Promise<IValidationResult>;
fixedWidth?: boolean;
onFinished(ok?: false, text?: void): void;
onFinished(ok: true, text: string): void;
}
interface IState {
value: string;
busy: boolean;
valid: boolean;
}
export default class TextInputDialog extends React.Component<IProps, IState> {
private field;
static defaultProps: Partial<IProps>;
constructor(props: IProps);
componentDidMount(): void;
private onOk;
private onCancel;
private onChange;
private onValidate;
render(): React.ReactNode;
}
export {};