@sinco/react 1.0.11-rc.5 → 1.0.11-rc.7

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -17437,16 +17437,15 @@ var _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("p
17437
17437
  }), 'Close');
17438
17438
  default_1 = Close.default = _default;
17439
17439
 
17440
- const stylesDrawer = {
17440
+ const DrawerContainer = {
17441
17441
  display: 'flex',
17442
17442
  flexDirection: 'column',
17443
17443
  alignContent: 'flex-start',
17444
17444
  justifyContent: 'space-between',
17445
- width: '530px',
17446
17445
  height: '100%',
17447
17446
  overflow: 'hidden'
17448
17447
  };
17449
- const stylesDrawerHeader = {
17448
+ const DrawerHeader = {
17450
17449
  display: 'flex',
17451
17450
  alignContent: 'center',
17452
17451
  justifyContent: 'space-between',
@@ -17454,7 +17453,7 @@ const stylesDrawerHeader = {
17454
17453
  py: '12px',
17455
17454
  px: '8px'
17456
17455
  };
17457
- const stylesDrawerContent = {
17456
+ const DrawerContent = {
17458
17457
  display: 'flex',
17459
17458
  overflow: 'auto',
17460
17459
  alignItems: 'flex-start',
@@ -17463,26 +17462,28 @@ const stylesDrawerContent = {
17463
17462
  py: '12px',
17464
17463
  px: '8px'
17465
17464
  };
17466
- const stylesDrawerActions = {
17465
+ const DrawerActions = {
17467
17466
  display: 'flex',
17468
17467
  alignContent: 'center',
17469
17468
  justifyContent: 'flex-end',
17470
17469
  borderTop: '1px solid rgba(16, 24, 64, 0.23)',
17471
17470
  backgroundColor: '#F1F0EE',
17472
- mt: '4px',
17473
17471
  gap: '8px',
17472
+ mt: '4px',
17474
17473
  py: '12px',
17475
17474
  px: '8px'
17476
17475
  };
17477
17476
  const DrawerComponent = ({
17478
17477
  title,
17479
17478
  children,
17480
- actions,
17479
+ renderActions,
17480
+ showActions,
17481
17481
  position,
17482
+ width,
17482
17483
  open,
17483
17484
  onClose
17484
17485
  }) => {
17485
- const [stateActions, setActionsState] = useState(false);
17486
+ const [stateActions, setActionsState] = useState(showActions);
17486
17487
  const handleDrawerActions = () => {
17487
17488
  setActionsState(true);
17488
17489
  };
@@ -17493,9 +17494,10 @@ const DrawerComponent = ({
17493
17494
  open: open,
17494
17495
  onClose: onClose
17495
17496
  }, /*#__PURE__*/React__default.createElement(Box$2, {
17496
- sx: stylesDrawer
17497
+ sx: DrawerContainer,
17498
+ width: width
17497
17499
  }, /*#__PURE__*/React__default.createElement(Box$2, {
17498
- sx: stylesDrawerHeader
17500
+ sx: DrawerHeader
17499
17501
  }, /*#__PURE__*/React__default.createElement(Typography$1, {
17500
17502
  variant: "h6"
17501
17503
  }, title), /*#__PURE__*/React__default.createElement(Box$2, null, /*#__PURE__*/React__default.createElement(IconButton$1, {
@@ -17504,11 +17506,11 @@ const DrawerComponent = ({
17504
17506
  }, /*#__PURE__*/React__default.createElement(default_1, {
17505
17507
  fontSize: "small"
17506
17508
  })))), /*#__PURE__*/React__default.createElement(Box$2, {
17507
- onClick: handleDrawerActions,
17508
- sx: stylesDrawerContent
17509
+ sx: DrawerContent,
17510
+ onClick: handleDrawerActions
17509
17511
  }, children), stateActions && /*#__PURE__*/React__default.createElement(Box$2, {
17510
- sx: stylesDrawerActions
17511
- }, actions))));
17512
+ sx: DrawerActions
17513
+ }, renderActions))));
17512
17514
  };
17513
17515
 
17514
17516
  const ToastContainer = styled$1(Stack$1)(() => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinco/react",
3
- "version": "1.0.11-rc.5",
3
+ "version": "1.0.11-rc.7",
4
4
  "description": "package for the configuration of mui react sinco",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -3,9 +3,11 @@ export type handleDrawerPosition = 'left' | 'right';
3
3
  export interface DrawerComponentProperties {
4
4
  title: string;
5
5
  children: ReactNode;
6
- actions: ReactNode;
6
+ renderActions: ReactNode;
7
+ showActions?: boolean;
7
8
  position?: handleDrawerPosition;
9
+ width: string;
8
10
  open: boolean;
9
11
  onClose: () => void;
10
12
  }
11
- export declare const DrawerComponent: ({ title, children, actions, position, open, onClose, }: DrawerComponentProperties) => JSX.Element;
13
+ export declare const DrawerComponent: ({ title, children, renderActions, showActions, position, width, open, onClose, }: DrawerComponentProperties) => JSX.Element;