Comparing version 1.0.58 to 1.0.59
@@ -24,2 +24,6 @@ "use strict"; | ||
var _View = _interopRequireDefault(require("../tags/container/View")); | ||
var _Text = _interopRequireDefault(require("../tags/typo/Text")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -31,35 +35,2 @@ | ||
var styles = _reactNative.StyleSheet.create({ | ||
toastContainer: { | ||
position: 'absolute', | ||
left: 0, | ||
top: 0, | ||
width: '100%', | ||
height: '100%', | ||
zIndex: 120, | ||
justifyContent: 'space-between' | ||
}, | ||
toastItem: { | ||
marginVertical: 4, | ||
backgroundColor: 'rgba(0,0,0,0.7)', | ||
height: 36, | ||
marginHorizontal: 24, | ||
borderRadius: 4, | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
shadowColor: '#000', | ||
shadowOffset: { | ||
width: 0, | ||
height: 2 | ||
}, | ||
shadowOpacity: 0.25, | ||
shadowRadius: 3.84, | ||
elevation: 5 | ||
}, | ||
toastText: { | ||
color: '#fff', | ||
fontSize: 14 | ||
} | ||
}); | ||
var Provider = function Provider(props) { | ||
@@ -85,3 +56,3 @@ var _a, _b, _c, _d, _e; | ||
var inset = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)(); | ||
console.log(_actbase.default); | ||
console.log(_actbase.default, setDimen); | ||
var value = React.useMemo(function () { | ||
@@ -160,10 +131,9 @@ return { | ||
value: value | ||
}, React.createElement(_reactNative.View, { | ||
onLayout: function onLayout(_a) { | ||
var nativeEvent = _a.nativeEvent; | ||
setDimen({ | ||
height: nativeEvent === null || nativeEvent === void 0 ? void 0 : nativeEvent.layout.height, | ||
y: nativeEvent === null || nativeEvent === void 0 ? void 0 : nativeEvent.layout.y | ||
}); | ||
}, | ||
}, React.createElement(_View.default // onLayout={({ nativeEvent }) => { | ||
// setDimen({ height: nativeEvent?.layout.height, y: nativeEvent?.layout.y }); | ||
// }} | ||
, { | ||
// onLayout={({ nativeEvent }) => { | ||
// setDimen({ height: nativeEvent?.layout.height, y: nativeEvent?.layout.y }); | ||
// }} | ||
style: { | ||
@@ -173,3 +143,3 @@ flex: 1 | ||
}, props.children, (_a = nodes.current) === null || _a === void 0 ? void 0 : _a.map(function (node, index) { | ||
return React.createElement(_reactNative.View, { | ||
return React.createElement(_View.default, { | ||
key: "" + index, | ||
@@ -184,6 +154,5 @@ style: { | ||
}, node); | ||
}), React.createElement(_reactNative.View, { | ||
pointerEvents: 'none', | ||
style: styles.toastContainer | ||
}, React.createElement(_reactNative.View, { | ||
}), React.createElement(_View.default, { | ||
className: 'ab-toast-container' | ||
}, React.createElement(_View.default, { | ||
style: { | ||
@@ -195,9 +164,9 @@ paddingTop: (inset === null || inset === void 0 ? void 0 : inset.top) || 0 | ||
})) === null || _c === void 0 ? void 0 : _c.map(function (item) { | ||
return React.createElement(_reactNative.View, { | ||
return React.createElement(_View.default, { | ||
key: "" + item.index, | ||
style: styles.toastItem | ||
}, React.createElement(_reactNative.Text, { | ||
style: styles.toastText | ||
className: 'ab-toast-item' | ||
}, React.createElement(_Text.default, { | ||
className: 'ab-toast-text' | ||
}, item.message)); | ||
})), React.createElement(_reactNative.View, { | ||
})), React.createElement(_View.default, { | ||
style: { | ||
@@ -209,7 +178,7 @@ paddingBottom: (inset === null || inset === void 0 ? void 0 : inset.top) || 0 | ||
})) === null || _e === void 0 ? void 0 : _e.map(function (item) { | ||
return React.createElement(_reactNative.View, { | ||
return React.createElement(_View.default, { | ||
key: "" + item.index, | ||
style: styles.toastItem | ||
}, React.createElement(_reactNative.Text, { | ||
style: styles.toastText | ||
className: 'ab-toast-item' | ||
}, React.createElement(_Text.default, { | ||
className: 'ab-toast-text' | ||
}, item.message)); | ||
@@ -216,0 +185,0 @@ }))))); |
{ | ||
"name": "actbase", | ||
"version": "1.0.58", | ||
"version": "1.0.59", | ||
"description": "React-Native Design Components", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
5868
292525