indicator-ui 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -8181,25 +8181,19 @@ const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, ty
8181
8181
  const getDropdown = () => {
8182
8182
  if (!dropdown)
8183
8183
  return undefined;
8184
- if (typeof dropdown === "boolean") {
8185
- return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(className?.dropdown, { [className?.dropdownReverse]: dropdownState }), children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_4__.ChevronDownSVG, {}) });
8186
- }
8187
- else {
8188
- return dropdown;
8189
- }
8184
+ const dropdownIcon = typeof dropdown === "boolean" ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_4__.ChevronDownSVG, {}) : dropdown;
8185
+ const dropdownClassName = typeof dropdownState === 'string' ? dropdownState : (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(className?.dropdown, { [className?.dropdownReverse]: dropdownState });
8186
+ return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: dropdownClassName, children: dropdownIcon });
8190
8187
  };
8191
8188
  const getButton = () => {
8192
8189
  if (!button)
8193
8190
  return undefined;
8194
- if (typeof button === "boolean") {
8195
- return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: onButtonClick, className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(className?.button, {
8196
- [className?.gray]: buttonState === 'gray',
8197
- [className?.red]: buttonState === 'red'
8198
- }), children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_4__.XCloseSVG, {}) });
8199
- }
8200
- else {
8201
- return button;
8202
- }
8191
+ const buttonIcon = typeof button === "boolean" ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_4__.XCloseSVG, {}) : button;
8192
+ const buttonClassName = typeof buttonState === 'string' ? buttonState : (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(className?.button, {
8193
+ [className?.gray]: buttonState === 'gray',
8194
+ [className?.red]: buttonState === 'red'
8195
+ });
8196
+ return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: buttonClassName, children: buttonIcon });
8203
8197
  };
8204
8198
  return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { ref: ref, onClick: onClick, className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(className?.flexField, {
8205
8199
  [className?.isError]: isError,