@7shifts/sous-chef 3.73.1-beta.1 → 3.74.0

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.
@@ -10420,9 +10420,18 @@ function CustomMenu(_ref) {
10420
10420
  size: "medium"
10421
10421
  }), button || __('createOption')));
10422
10422
  }
10423
- return React__default.cloneElement(button, {
10424
- onClick: () => setShowFooter(true)
10425
- });
10423
+ // Assuming the button will be the Button component
10424
+ const overrideProps = {};
10425
+ if (!button.props.onClick) {
10426
+ overrideProps.onClick = () => setShowFooter(true);
10427
+ }
10428
+ if (!button.props.size) {
10429
+ overrideProps.size = "full-width";
10430
+ }
10431
+ if (!button.props.theme) {
10432
+ overrideProps.theme = "link-primary";
10433
+ }
10434
+ return React__default.cloneElement(button, overrideProps);
10426
10435
  };
10427
10436
  const onCreateButton = () => {
10428
10437
  if (textFieldRef.current && textFieldRef.current.value.trim() !== '' && onCreate) {
@@ -10474,7 +10483,9 @@ function CustomMenu(_ref) {
10474
10483
  autoFocus: true,
10475
10484
  defaultValue: inputDefaultValue
10476
10485
  }), React__default.createElement(Button, {
10477
- onClick: onCreateButton,
10486
+ onClick: () => {
10487
+ onCreateButton();
10488
+ },
10478
10489
  onKeyDown: e => {
10479
10490
  e.stopPropagation();
10480
10491
  }
@@ -10610,7 +10621,9 @@ const ToolbarSelect = ({
10610
10621
  menuShouldScrollIntoView,
10611
10622
  disabled,
10612
10623
  prefix,
10613
- testId
10624
+ testId,
10625
+ creatableButton,
10626
+ onCreate
10614
10627
  }) => {
10615
10628
  return React__default.createElement(SelectField, {
10616
10629
  name: name,
@@ -10624,6 +10637,8 @@ const ToolbarSelect = ({
10624
10637
  disabled: disabled,
10625
10638
  prefix: prefix,
10626
10639
  testId: testId,
10640
+ creatableButton: creatableButton,
10641
+ onCreate: onCreate,
10627
10642
  asToolbarFilter: true
10628
10643
  });
10629
10644
  };