@sinco/react 1.0.11-rc.5 → 1.0.11-rc.7
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.
- package/index.js +16 -14
- package/package.json +1 -1
- package/src/lib/Components/Drawer.d.ts +4 -2
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
|
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
|
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
|
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
|
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
|
-
|
17479
|
+
renderActions,
|
17480
|
+
showActions,
|
17481
17481
|
position,
|
17482
|
+
width,
|
17482
17483
|
open,
|
17483
17484
|
onClose
|
17484
17485
|
}) => {
|
17485
|
-
const [stateActions, setActionsState] = useState(
|
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:
|
17497
|
+
sx: DrawerContainer,
|
17498
|
+
width: width
|
17497
17499
|
}, /*#__PURE__*/React__default.createElement(Box$2, {
|
17498
|
-
sx:
|
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
|
-
|
17508
|
-
|
17509
|
+
sx: DrawerContent,
|
17510
|
+
onClick: handleDrawerActions
|
17509
17511
|
}, children), stateActions && /*#__PURE__*/React__default.createElement(Box$2, {
|
17510
|
-
sx:
|
17511
|
-
},
|
17512
|
+
sx: DrawerActions
|
17513
|
+
}, renderActions))));
|
17512
17514
|
};
|
17513
17515
|
|
17514
17516
|
const ToastContainer = styled$1(Stack$1)(() => ({
|
package/package.json
CHANGED
@@ -3,9 +3,11 @@ export type handleDrawerPosition = 'left' | 'right';
|
|
3
3
|
export interface DrawerComponentProperties {
|
4
4
|
title: string;
|
5
5
|
children: ReactNode;
|
6
|
-
|
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,
|
13
|
+
export declare const DrawerComponent: ({ title, children, renderActions, showActions, position, width, open, onClose, }: DrawerComponentProperties) => JSX.Element;
|