PromucFlow_constructor/app/client/src/widgets/InputWidget.tsx

35 lines
697 B
TypeScript
Raw Normal View History

2019-09-12 08:11:25 +00:00
import React from "react";
import BaseWidget, { WidgetProps, WidgetState } from "./BaseWidget";
2019-09-12 08:11:25 +00:00
import { WidgetType } from "../constants/WidgetConstants";
class InputWidget extends BaseWidget<InputWidgetProps, WidgetState> {
2019-09-12 08:11:25 +00:00
getPageView() {
return <div />;
2019-09-12 08:11:25 +00:00
}
getWidgetType(): WidgetType {
return "INPUT_WIDGET";
}
}
export type InputType =
| "TEXT"
| "NUMBER"
| "INTEGER"
| "PHONE_NUMBER"
| "EMAIL"
| "PASSWORD"
| "CURRENCY"
| "SEARCH";
2019-09-12 08:11:25 +00:00
export interface InputWidgetProps extends WidgetProps {
errorMessage?: string;
2019-09-12 08:11:25 +00:00
inputType: InputType;
defaultText?: string;
placeholder?: string;
label: string;
focusIndex?: number;
2019-09-12 08:11:25 +00:00
}
export default InputWidget;