46 lines
1.4 KiB
TypeScript
46 lines
1.4 KiB
TypeScript
import { Alignment } from "@blueprintjs/core";
|
|
import { LabelPosition } from "components/constants";
|
|
import IconSVG from "./icon.svg";
|
|
import Widget from "./widget";
|
|
|
|
export const CONFIG = {
|
|
type: Widget.getWidgetType(),
|
|
name: "Switch Group", // The display name which will be made in uppercase and show in the widgets panel ( can have spaces )
|
|
iconSVG: IconSVG,
|
|
needsMeta: true, // Defines if this widget adds any meta properties
|
|
isCanvas: false, // Defines if this widget has a canvas within in which we can drop other widgets
|
|
defaults: {
|
|
widgetName: "SwitchGroup",
|
|
rows: 4,
|
|
columns: 26,
|
|
options: [
|
|
{ label: "Blue", value: "BLUE" },
|
|
{ label: "Green", value: "GREEN" },
|
|
{ label: "Red", value: "RED" },
|
|
],
|
|
defaultSelectedValues: ["BLUE"],
|
|
isDisabled: false,
|
|
isRequired: false,
|
|
isInline: true,
|
|
isVisible: true,
|
|
animateLoading: true,
|
|
alignment: Alignment.LEFT,
|
|
labelText: "Label",
|
|
labelPosition: LabelPosition.Left,
|
|
labelAlignment: Alignment.LEFT,
|
|
labelWidth: 5,
|
|
version: 1,
|
|
labelTextSize: "0.875rem",
|
|
},
|
|
properties: {
|
|
derived: Widget.getDerivedPropertiesMap(),
|
|
default: Widget.getDefaultPropertiesMap(),
|
|
meta: Widget.getMetaPropertiesMap(),
|
|
config: Widget.getPropertyPaneConfig(),
|
|
contentConfig: Widget.getPropertyPaneContentConfig(),
|
|
styleConfig: Widget.getPropertyPaneStyleConfig(),
|
|
},
|
|
};
|
|
|
|
export default Widget;
|