PromucFlow_constructor/app/client/src/editorComponents/BaseComponent.tsx

29 lines
701 B
TypeScript
Raw Normal View History

2019-09-09 09:08:54 +00:00
import { Component } from "react";
import { PositionType, CSSUnit } from "../constants/WidgetConstants";
2019-09-05 17:47:50 +00:00
import { Color } from "../constants/DefaultTheme";
/***
* Components are responsible for binding render inputs to corresponding UI SDKs
*/
2019-09-05 17:47:50 +00:00
abstract class BaseComponent<T extends ComponentProps> extends Component<T> {}
export interface BaseStyle {
2019-09-09 09:08:54 +00:00
height?: number;
width?: number;
positionType: PositionType;
xPosition: number;
yPosition: number;
xPositionUnit: CSSUnit;
yPositionUnit: CSSUnit;
heightUnit?: CSSUnit;
widthUnit?: CSSUnit;
backgroundColor?: Color;
}
2019-09-05 17:47:50 +00:00
export interface ComponentProps {
2019-09-09 09:08:54 +00:00
widgetId: string;
style: BaseStyle;
}
2019-09-09 09:08:54 +00:00
export default BaseComponent;