1 line
3.4 KiB
JSON
1 line
3.4 KiB
JSON
{"ast":null,"code":"import * as React from 'react';\nfunction executeValue(value) {\n return typeof value === 'function' ? value() : value;\n}\nexport default function PresetPanel(props) {\n var prefixCls = props.prefixCls,\n presets = props.presets,\n _onClick = props.onClick,\n onHover = props.onHover;\n if (!presets.length) {\n return null;\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-presets\")\n }, /*#__PURE__*/React.createElement(\"ul\", null, presets.map(function (_ref, index) {\n var label = _ref.label,\n value = _ref.value;\n return /*#__PURE__*/React.createElement(\"li\", {\n key: index,\n onClick: function onClick() {\n _onClick(executeValue(value));\n },\n onMouseEnter: function onMouseEnter() {\n onHover(executeValue(value));\n },\n onMouseLeave: function onMouseLeave() {\n onHover(null);\n }\n }, label);\n })));\n}","map":{"version":3,"names":["React","executeValue","value","PresetPanel","props","prefixCls","presets","_onClick","onClick","onHover","length","createElement","className","concat","map","_ref","index","label","key","onMouseEnter","onMouseLeave"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/rc-picker/es/PickerInput/Popup/PresetPanel.js"],"sourcesContent":["import * as React from 'react';\nfunction executeValue(value) {\n return typeof value === 'function' ? value() : value;\n}\nexport default function PresetPanel(props) {\n var prefixCls = props.prefixCls,\n presets = props.presets,\n _onClick = props.onClick,\n onHover = props.onHover;\n if (!presets.length) {\n return null;\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-presets\")\n }, /*#__PURE__*/React.createElement(\"ul\", null, presets.map(function (_ref, index) {\n var label = _ref.label,\n value = _ref.value;\n return /*#__PURE__*/React.createElement(\"li\", {\n key: index,\n onClick: function onClick() {\n _onClick(executeValue(value));\n },\n onMouseEnter: function onMouseEnter() {\n onHover(executeValue(value));\n },\n onMouseLeave: function onMouseLeave() {\n onHover(null);\n }\n }, label);\n })));\n}"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,Y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