pollination-react-io 0.0.8 → 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>;
@@ -1900,7 +1900,6 @@ function sendMessageDotNet(message) {
1900
1900
  if (!checkDotNet())
1901
1901
  return undefined;
1902
1902
  var json = JSON.stringify(message);
1903
- console.log(message);
1904
1903
  try {
1905
1904
  window.parent.chrome.webview.postMessage(json);
1906
1905
  }
@@ -4441,20 +4440,21 @@ function Logo() {
4441
4440
  }
4442
4441
 
4443
4442
  var SettingsButton = function (_a) {
4444
- 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;
4445
4444
  return (React__default.createElement("div", { className: "btn-group ".concat(disabled && 'btn-group-disabled') },
4446
4445
  React__default.createElement("button", { onClick: onClick, disabled: disabled, style: {
4447
4446
  flex: 1,
4448
4447
  } },
4449
4448
  React__default.createElement(Logo, null),
4450
4449
  disabled ? 'Open in a Pollination CAD Plugin' : label),
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 })));
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 })));
4458
4458
  };
4459
4459
 
4460
4460
  var KEY$1 = performance.now().toString();