PromucFlow_constructor/app/client/src/components/designSystems/appsmith/BaseComponent.tsx

33 lines
813 B
TypeScript
Raw Normal View History

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
/***
* 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 {
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;
border?: string;
}
2019-09-05 17:47:50 +00:00
export interface ComponentProps {
2019-09-09 09:08:54 +00:00
widgetId: string;
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-09-09 09:08:54 +00:00
export default BaseComponent;