@arpitbhalla/rneui-base-dev
Version:
Cross Platform React Native UI Toolkit
50 lines (49 loc) • 2.1 kB
JavaScript
;
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DialogBase = void 0;
var react_1 = __importDefault(require("react"));
var react_native_1 = require("react-native");
var Overlay_1 = require("../Overlay");
var DialogBase = function (_a) {
var children = _a.children, overlayStyle = _a.overlayStyle, onBackdropPress = _a.onBackdropPress, isVisible = _a.isVisible, rest = __rest(_a, ["children", "overlayStyle", "onBackdropPress", "isVisible"]);
return (react_1.default.createElement(Overlay_1.Overlay, __assign({ isVisible: isVisible, onBackdropPress: onBackdropPress, overlayStyle: react_native_1.StyleSheet.flatten([styles.dialog, overlayStyle]), testID: "Internal__Overlay" }, rest), children));
};
exports.DialogBase = DialogBase;
var styles = react_native_1.StyleSheet.create({
dialog: {
width: '75%',
padding: 20,
},
buttonView: {
marginTop: 10,
marginRight: -35,
flexDirection: 'row-reverse',
justifyContent: 'flex-start',
},
});
exports.DialogBase.displayName = 'Dialog';