PromucFlow_constructor/app/client/src/editorComponents/BaseComponent.tsx
2019-09-09 14:38:54 +05:30

29 lines
701 B
TypeScript

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