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