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

33 lines
700 B
TypeScript
Raw Normal View History

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