2019-09-09 09:08:54 +00:00
|
|
|
import { Component } from "react";
|
|
|
|
|
import { PositionType, CSSUnit } from "../constants/WidgetConstants";
|
2019-09-22 20:25:05 +00:00
|
|
|
import { Color } from "../constants/Colors";
|
2019-09-05 17:47:50 +00:00
|
|
|
|
2019-02-10 13:06:05 +00:00
|
|
|
/***
|
|
|
|
|
* 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> {}
|
2019-02-10 13:06:05 +00:00
|
|
|
|
|
|
|
|
export interface BaseStyle {
|
2019-09-24 12:36:03 +00:00
|
|
|
componentHeight?: number;
|
|
|
|
|
componentWidth?: number;
|
2019-09-09 09:08:54 +00:00
|
|
|
positionType: PositionType;
|
|
|
|
|
xPosition: number;
|
|
|
|
|
yPosition: number;
|
|
|
|
|
xPositionUnit: CSSUnit;
|
|
|
|
|
yPositionUnit: CSSUnit;
|
|
|
|
|
heightUnit?: CSSUnit;
|
|
|
|
|
widthUnit?: CSSUnit;
|
|
|
|
|
backgroundColor?: Color;
|
2019-02-10 13:06:05 +00:00
|
|
|
}
|
|
|
|
|
|
2019-09-05 17:47:50 +00:00
|
|
|
export interface ComponentProps {
|
2019-09-09 09:08:54 +00:00
|
|
|
widgetId: string;
|
|
|
|
|
style: BaseStyle;
|
2019-02-10 13:06:05 +00:00
|
|
|
}
|
|
|
|
|
|
2019-09-09 09:08:54 +00:00
|
|
|
export default BaseComponent;
|