@rahmatsaputra-my-id/react-js-library 0.0.98 → 0.0.99
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/dist/index.es.js
CHANGED
|
@@ -142,8 +142,8 @@ var styles$l = {
|
|
|
142
142
|
};
|
|
143
143
|
|
|
144
144
|
var BottomSheet = function (_a) {
|
|
145
|
-
var visible = _a.visible, onClose = _a.onClose, _b = _a.title, title = _b === void 0 ? '' : _b, children = _a.children;
|
|
146
|
-
var
|
|
145
|
+
var visible = _a.visible, onClose = _a.onClose, _b = _a.title, title = _b === void 0 ? '' : _b, children = _a.children, containerStyles = _a.containerStyles, _c = _a.showCloseButton, showCloseButton = _c === void 0 ? true : _c;
|
|
146
|
+
var _d = useState(20), paddingBottom = _d[0], setPaddingBottom = _d[1];
|
|
147
147
|
useEffect(function () {
|
|
148
148
|
function detectPadding() {
|
|
149
149
|
var basePadding = 20;
|
|
@@ -186,7 +186,7 @@ var BottomSheet = function (_a) {
|
|
|
186
186
|
}, [visible, onClose]);
|
|
187
187
|
if (!visible)
|
|
188
188
|
return null;
|
|
189
|
-
return ReactDOM.createPortal(jsx("div", __assign({ style: styles$l.backdrop, onClick: onClose }, { children: jsxs("div", __assign({ style: __assign(__assign({}, styles$l.sheet), { paddingBottom: paddingBottom }), onClick: function (e) { return e.stopPropagation(); } }, { children: [jsxs("div", __assign({ style: styles$l.header }, { children: [jsx("span", __assign({ style: styles$l.title }, { children: title })), jsx("button",
|
|
189
|
+
return ReactDOM.createPortal(jsx("div", __assign({ style: styles$l.backdrop, onClick: onClose }, { children: jsxs("div", __assign({ style: __assign(__assign(__assign({}, styles$l.sheet), containerStyles), { paddingBottom: paddingBottom }), onClick: function (e) { return e.stopPropagation(); } }, { children: [jsxs("div", __assign({ style: styles$l.header }, { children: [jsx("span", __assign({ style: styles$l.title }, { children: title })), showCloseButton ? (jsx("button", { style: styles$l.closeButton, onClick: onClose, children: 'x' })) : null] })), jsx("div", __assign({ style: styles$l.content }, { children: children }))] })) })), document.body);
|
|
190
190
|
};
|
|
191
191
|
|
|
192
192
|
var styles$k = {
|
package/dist/index.js
CHANGED
|
@@ -151,8 +151,8 @@ var styles$l = {
|
|
|
151
151
|
};
|
|
152
152
|
|
|
153
153
|
var BottomSheet = function (_a) {
|
|
154
|
-
var visible = _a.visible, onClose = _a.onClose, _b = _a.title, title = _b === void 0 ? '' : _b, children = _a.children;
|
|
155
|
-
var
|
|
154
|
+
var visible = _a.visible, onClose = _a.onClose, _b = _a.title, title = _b === void 0 ? '' : _b, children = _a.children, containerStyles = _a.containerStyles, _c = _a.showCloseButton, showCloseButton = _c === void 0 ? true : _c;
|
|
155
|
+
var _d = React.useState(20), paddingBottom = _d[0], setPaddingBottom = _d[1];
|
|
156
156
|
React.useEffect(function () {
|
|
157
157
|
function detectPadding() {
|
|
158
158
|
var basePadding = 20;
|
|
@@ -195,7 +195,7 @@ var BottomSheet = function (_a) {
|
|
|
195
195
|
}, [visible, onClose]);
|
|
196
196
|
if (!visible)
|
|
197
197
|
return null;
|
|
198
|
-
return ReactDOM__default["default"].createPortal(jsxRuntime.jsx("div", __assign({ style: styles$l.backdrop, onClick: onClose }, { children: jsxRuntime.jsxs("div", __assign({ style: __assign(__assign({}, styles$l.sheet), { paddingBottom: paddingBottom }), onClick: function (e) { return e.stopPropagation(); } }, { children: [jsxRuntime.jsxs("div", __assign({ style: styles$l.header }, { children: [jsxRuntime.jsx("span", __assign({ style: styles$l.title }, { children: title })), jsxRuntime.jsx("button",
|
|
198
|
+
return ReactDOM__default["default"].createPortal(jsxRuntime.jsx("div", __assign({ style: styles$l.backdrop, onClick: onClose }, { children: jsxRuntime.jsxs("div", __assign({ style: __assign(__assign(__assign({}, styles$l.sheet), containerStyles), { paddingBottom: paddingBottom }), onClick: function (e) { return e.stopPropagation(); } }, { children: [jsxRuntime.jsxs("div", __assign({ style: styles$l.header }, { children: [jsxRuntime.jsx("span", __assign({ style: styles$l.title }, { children: title })), showCloseButton ? (jsxRuntime.jsx("button", { style: styles$l.closeButton, onClick: onClose, children: 'x' })) : null] })), jsxRuntime.jsx("div", __assign({ style: styles$l.content }, { children: children }))] })) })), document.body);
|
|
199
199
|
};
|
|
200
200
|
|
|
201
201
|
var styles$k = {
|