@superdispatch/ui 0.42.0 → 0.43.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.
@@ -1,3 +1,4 @@
1
+ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
1
2
  import { Drawer as MuiDrawer, IconButton } from '@material-ui/core';
2
3
  import { ArrowBack as BackIcon, Close as CloseIcon } from '@material-ui/icons';
3
4
  import styled from 'styled-components';
@@ -60,17 +61,17 @@ export function AppDrawer(_ref) {
60
61
  children: children
61
62
  }), (primaryAction || secondaryAction) && /*#__PURE__*/_jsx(DrawerActions, {
62
63
  children: /*#__PURE__*/_jsxs(StyledActionsLayout, {
63
- children: [primaryAction && /*#__PURE__*/_jsx(Button, {
64
+ children: [primaryAction && /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
64
65
  type: "button",
65
- onClick: primaryAction.onClick,
66
- variant: "contained",
66
+ variant: "contained"
67
+ }, primaryAction), {}, {
67
68
  children: primaryAction.label
68
- }), secondaryAction && /*#__PURE__*/_jsx(Button, {
69
+ })), secondaryAction && /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
69
70
  type: "button",
70
- onClick: secondaryAction.onClick,
71
- variant: "outlined",
71
+ variant: "outlined"
72
+ }, secondaryAction), {}, {
72
73
  children: secondaryAction.label
73
- })]
74
+ }))]
74
75
  })
75
76
  })]
76
77
  });
@@ -56,10 +56,8 @@ declare const AdaptiveVerticalToolbar: ForwardRefExoticComponent<AdaptiveVertica
56
56
  declare const DRAWER_SIZE_VALUES: readonly ["md", "lg", "xl", "xxl"];
57
57
 
58
58
  declare type AppDrawerSize = typeof DRAWER_SIZE_VALUES[number];
59
- interface DrawerActionDef {
59
+ interface DrawerActionDef extends Omit<ButtonProps, 'variant'> {
60
60
  label: string;
61
- form?: string;
62
- onClick: () => void;
63
61
  }
64
62
  interface AppDrawerProps {
65
63
  title: string;
package/dist-web/index.js CHANGED
@@ -992,17 +992,17 @@ function AppDrawer(_ref) {
992
992
  children: children
993
993
  }), (primaryAction || secondaryAction) && /*#__PURE__*/jsx(DrawerActions, {
994
994
  children: /*#__PURE__*/jsxs(StyledActionsLayout, {
995
- children: [primaryAction && /*#__PURE__*/jsx(Button, {
995
+ children: [primaryAction && /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({
996
996
  type: "button",
997
- onClick: primaryAction.onClick,
998
- variant: "contained",
997
+ variant: "contained"
998
+ }, primaryAction), {}, {
999
999
  children: primaryAction.label
1000
- }), secondaryAction && /*#__PURE__*/jsx(Button, {
1000
+ })), secondaryAction && /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({
1001
1001
  type: "button",
1002
- onClick: secondaryAction.onClick,
1003
- variant: "outlined",
1002
+ variant: "outlined"
1003
+ }, secondaryAction), {}, {
1004
1004
  children: secondaryAction.label
1005
- })]
1005
+ }))]
1006
1006
  })
1007
1007
  })]
1008
1008
  });