28 lines
743 B
TypeScript
28 lines
743 B
TypeScript
|
|
import Widget from "./widget";
|
||
|
|
import IconSVG from "./icon.svg";
|
||
|
|
import { CONFIG as BaseConfig } from "widgets/BaseInputWidget";
|
||
|
|
import { getDefaultCurrency } from "./component/CurrencyCodeDropdown";
|
||
|
|
|
||
|
|
export const CONFIG = {
|
||
|
|
type: Widget.getWidgetType(),
|
||
|
|
name: "Currency Input",
|
||
|
|
iconSVG: IconSVG,
|
||
|
|
needsMeta: true,
|
||
|
|
defaults: {
|
||
|
|
...BaseConfig.defaults,
|
||
|
|
widgetName: "CurrencyInput",
|
||
|
|
version: 1,
|
||
|
|
allowCurrencyChange: false,
|
||
|
|
currencyCode: getDefaultCurrency().currency,
|
||
|
|
decimals: 0,
|
||
|
|
},
|
||
|
|
properties: {
|
||
|
|
derived: Widget.getDerivedPropertiesMap(),
|
||
|
|
default: Widget.getDefaultPropertiesMap(),
|
||
|
|
meta: Widget.getMetaPropertiesMap(),
|
||
|
|
config: Widget.getPropertyPaneConfig(),
|
||
|
|
},
|
||
|
|
};
|
||
|
|
|
||
|
|
export default Widget;
|