PromucFlow_constructor/app/client/src/components/designSystems/appsmith/BaseComponent.tsx
Nikhil Nandagopal 3e9f278b95 Release
2019-11-05 05:09:50 +00:00

33 lines
813 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;
border?: string;
}
export interface ComponentProps {
widgetId: string;
widgetName?: string;
style: BaseStyle;
isDisabled?: boolean;
isVisibile?: boolean;
}
export default BaseComponent;