react-native-navigation-drilldown
Version:
Drilldown screens to use with react-navigation
38 lines • 1.52 kB
JavaScript
;
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)
t[p[i]] = s[p[i]];
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var react_native_1 = require("react-native");
var react_native_platform_touchable_1 = require("react-native-platform-touchable");
var styles = react_native_1.StyleSheet.create({
icon: {
width: 32,
height: 32,
alignItems: 'center',
justifyContent: 'center',
},
imageBackground: {
width: 24,
height: 24,
},
});
var Icon = function (_a) {
var onPress = _a.onPress, wrapperStyle = _a.wrapperStyle, props = __rest(_a, ["onPress", "wrapperStyle"]);
return onPress ?
(<react_native_platform_touchable_1.default onPress={onPress} style={[styles.icon, wrapperStyle]}>
<react_native_1.ImageBackground {...props} style={styles.imageBackground}/>
</react_native_platform_touchable_1.default>) :
(<react_native_1.View style={[styles.icon, wrapperStyle]}>
<react_native_1.ImageBackground {...props} style={styles.imageBackground}/>
</react_native_1.View>);
};
exports.default = Icon;
//# sourceMappingURL=Icon.js.map