import { ButtonVariantTypes } from "components/constants";
import { Colors } from "constants/Colors";
import { THEMEING_TEXT_SIZES } from "constants/ThemeConstants";
import IconSVG from "./icon.svg";
import Widget from "./widget";
export const CONFIG = {
features: {
dynamicHeight: {
sectionIndex: 0,
active: true,
},
type: Widget.getWidgetType(),
name: "Stats Box",
iconSVG: IconSVG,
needsMeta: true,
isCanvas: true,
defaults: {
rows: 14,
columns: 16,
animateLoading: true,
widgetName: "Statbox",
backgroundColor: "white",
borderWidth: "1",
borderColor: Colors.GREY_5,
minDynamicHeight: 14,
children: [],
blueprint: {
view: [
{
type: "CANVAS_WIDGET",
position: { top: 0, left: 0 },
props: {
containerStyle: "none",
canExtend: false,
detachFromLayout: true,
version: 1,
type: "TEXT_WIDGET",
size: {
rows: 4,
cols: 36,
position: { top: 0, left: 1 },
text: "Page Views",
fontSize: "0.75rem",
textColor: "#999999",
position: {
top: 4,
left: 1,
text: "2.6 M",
fontSize: THEMEING_TEXT_SIZES.lg,
fontStyle: "BOLD",
top: 8,
text: "21% more than last month",
textColor: Colors.GREEN,
type: "ICON_BUTTON_WIDGET",
rows: 8,
cols: 16,
top: 2,
left: 46,
iconName: "arrow-top-right",
buttonStyle: "PRIMARY",
buttonVariant: ButtonVariantTypes.PRIMARY,
],
properties: {
derived: Widget.getDerivedPropertiesMap(),
default: Widget.getDefaultPropertiesMap(),
meta: Widget.getMetaPropertiesMap(),
config: Widget.getPropertyPaneConfig(),
contentConfig: Widget.getPropertyPaneContentConfig(),
styleConfig: Widget.getPropertyPaneStyleConfig(),
};
export default Widget;