PromucFlow_constructor/app/client/src/widgets/SingleSelectTreeWidget/index.ts
Bhavin K 7032ee6b89
fix: Update designs for select widgets according to Figma (#8594)
* updated design as per figma

* updated design, fix cypress test

* item width fix as required

* label functionality in select, tree-select wids

* changes as required

* label, placeholder and default focused item logic changes for select

* updated border color for invalid selected value

* fix for colors file
2021-11-16 09:27:38 +00:00

51 lines
1.2 KiB
TypeScript

import Widget from "./widget";
import IconSVG from "./icon.svg";
import { GRID_DENSITY_MIGRATION_V1 } from "widgets/constants";
export const CONFIG = {
type: Widget.getWidgetType(),
name: "TreeSelect",
iconSVG: IconSVG,
needsMeta: true,
defaults: {
rows: 1.725 * GRID_DENSITY_MIGRATION_V1,
columns: 5 * GRID_DENSITY_MIGRATION_V1,
options: [
{
label: "Blue",
value: "BLUE",
children: [
{
label: "Dark Blue",
value: "DARK BLUE",
},
{
label: "Light Blue",
value: "LIGHT BLUE",
},
],
},
{ label: "Green", value: "GREEN" },
{ label: "Red", value: "RED" },
],
widgetName: "TreeSelect",
defaultOptionValue: "BLUE",
version: 1,
isVisible: true,
isRequired: false,
isDisabled: false,
allowClear: false,
expandAll: false,
placeholderText: "Select option",
labelText: "Label",
},
properties: {
derived: Widget.getDerivedPropertiesMap(),
default: Widget.getDefaultPropertiesMap(),
meta: Widget.getMetaPropertiesMap(),
config: Widget.getPropertyPaneConfig(),
},
};
export default Widget;