## Description QA branch for mobile responsiveness --------- Co-authored-by: Aswath K <aswath@appsmith.com> Co-authored-by: Arsalan Yaldram <arsalanyaldram0211@outlook.com> Co-authored-by: Aswath K <aswath.sana@gmail.com> Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com> Co-authored-by: rahulramesha <rahul@appsmith.com>
86 lines
2.0 KiB
TypeScript
86 lines
2.0 KiB
TypeScript
import Widget from "./widget";
|
|
import IconSVG from "./icon.svg";
|
|
import { ButtonPlacementTypes, ButtonVariantTypes } from "components/constants";
|
|
import { MenuItemsSource } from "./constants";
|
|
|
|
export const CONFIG = {
|
|
type: Widget.getWidgetType(),
|
|
name: "Menu Button",
|
|
iconSVG: IconSVG,
|
|
defaults: {
|
|
label: "Open Menu",
|
|
menuVariant: ButtonVariantTypes.PRIMARY,
|
|
placement: ButtonPlacementTypes.CENTER,
|
|
isCompact: false,
|
|
isDisabled: false,
|
|
isVisible: true,
|
|
animateLoading: true,
|
|
menuItemsSource: MenuItemsSource.STATIC,
|
|
menuItems: {
|
|
menuItem1: {
|
|
label: "First Menu Item",
|
|
id: "menuItem1",
|
|
widgetId: "",
|
|
isVisible: true,
|
|
isDisabled: false,
|
|
index: 0,
|
|
},
|
|
menuItem2: {
|
|
label: "Second Menu Item",
|
|
id: "menuItem2",
|
|
widgetId: "",
|
|
isVisible: true,
|
|
isDisabled: false,
|
|
index: 1,
|
|
},
|
|
menuItem3: {
|
|
label: "Third Menu Item",
|
|
id: "menuItem3",
|
|
widgetId: "",
|
|
isVisible: true,
|
|
isDisabled: false,
|
|
index: 2,
|
|
},
|
|
},
|
|
rows: 4,
|
|
columns: 16,
|
|
widgetName: "MenuButton",
|
|
version: 1,
|
|
},
|
|
properties: {
|
|
derived: Widget.getDerivedPropertiesMap(),
|
|
default: Widget.getDefaultPropertiesMap(),
|
|
meta: Widget.getMetaPropertiesMap(),
|
|
config: Widget.getPropertyPaneConfig(),
|
|
contentConfig: Widget.getPropertyPaneContentConfig(),
|
|
styleConfig: Widget.getPropertyPaneStyleConfig(),
|
|
stylesheetConfig: Widget.getStylesheetConfig(),
|
|
},
|
|
autoLayout: {
|
|
defaults: {
|
|
rows: 4,
|
|
columns: 6.632,
|
|
},
|
|
autoDimension: {
|
|
width: true,
|
|
},
|
|
widgetSize: [
|
|
{
|
|
viewportMinWidth: 0,
|
|
configuration: () => {
|
|
return {
|
|
minWidth: "120px",
|
|
maxWidth: "360px",
|
|
};
|
|
},
|
|
},
|
|
],
|
|
disableResizeHandles: {
|
|
vertical: true,
|
|
horizontal: true,
|
|
},
|
|
},
|
|
};
|
|
|
|
export default Widget;
|