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

29 lines
722 B
TypeScript
Raw Normal View History

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-08-29 11:22:09 +00:00
height?: number;
width?: number;
positionType: PositionType;
xPosition: number;
yPosition: number;
xPositionUnit: CSSUnit;
yPositionUnit: CSSUnit;
heightUnit?: CSSUnit;
widthUnit?: CSSUnit;
backgroundColor?: Color;
2019-08-26 12:41:21 +00:00
}
2019-09-05 17:47:50 +00:00
export interface ComponentProps {
2019-08-29 11:22:09 +00:00
widgetId: string;
style: BaseStyle;
}
export default BaseComponent