pollination-react-io 0.0.10 → 0.0.11

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.
@@ -2,9 +2,9 @@ import { FC } from 'react';
2
2
  import { Option } from '../Dropdown/Dropdown';
3
3
  import '../buttons.scss';
4
4
  export interface SettingsButtonProps {
5
- options: Option[][];
6
5
  disabled: boolean;
7
6
  onClick: () => void;
8
7
  label: string;
8
+ options?: Option[][];
9
9
  }
10
10
  export declare const SettingsButton: FC<SettingsButtonProps>;
@@ -4440,20 +4440,21 @@ function Logo() {
4440
4440
  }
4441
4441
 
4442
4442
  var SettingsButton = function (_a) {
4443
- var options = _a.options, disabled = _a.disabled, onClick = _a.onClick, label = _a.label;
4443
+ var disabled = _a.disabled, onClick = _a.onClick, label = _a.label, options = _a.options;
4444
4444
  return (React__default.createElement("div", { className: "btn-group ".concat(disabled && 'btn-group-disabled') },
4445
4445
  React__default.createElement("button", { onClick: onClick, disabled: disabled, style: {
4446
4446
  flex: 1,
4447
4447
  } },
4448
4448
  React__default.createElement(Logo, null),
4449
4449
  disabled ? 'Open in a Pollination CAD Plugin' : label),
4450
- React__default.createElement(Dropdown, { trigger: React__default.createElement("button", null,
4451
- React__default.createElement(CaretDownFill$1, null)), options: options, contentProps: {
4452
- align: 'end',
4453
- style: {
4454
- fontSize: 'clamp(0.65rem, 8vw - 0.75rem, 0.85rem)',
4455
- }
4456
- }, disabled: disabled })));
4450
+ options && options.length > 0 &&
4451
+ React__default.createElement(Dropdown, { trigger: React__default.createElement("button", null,
4452
+ React__default.createElement(CaretDownFill$1, null)), options: options, contentProps: {
4453
+ align: 'end',
4454
+ style: {
4455
+ fontSize: 'clamp(0.65rem, 8vw - 0.75rem, 0.85rem)',
4456
+ }
4457
+ }, disabled: disabled })));
4457
4458
  };
4458
4459
 
4459
4460
  var KEY$1 = performance.now().toString();