2019-09-09 09:08:54 +00:00
|
|
|
import { Component } from "react";
|
2019-11-05 05:09:50 +00:00
|
|
|
import { PositionType, CSSUnit } from "../../../constants/WidgetConstants";
|
|
|
|
|
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-25 17:24:23 +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;
|
Property Pane Controls
- Fixes #121, #122, #123, #124, #90, #46, #65, #100, #101, #68, #102
2019-10-24 05:24:45 +00:00
|
|
|
border?: string;
|
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;
|
2019-10-02 18:13:04 +00:00
|
|
|
widgetName?: string;
|
2019-09-09 09:08:54 +00:00
|
|
|
style: BaseStyle;
|
2019-10-31 05:28:11 +00:00
|
|
|
isDisabled?: boolean;
|
|
|
|
|
isVisibile?: boolean;
|
2019-02-10 13:06:05 +00:00
|
|
|
}
|
|
|
|
|
|
2019-09-09 09:08:54 +00:00
|
|
|
export default BaseComponent;
|