react-native-modern-header
Version:
Fully customizable Modern Header View for React Native
22 lines • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const react_native_1 = require("react-native");
/**
* ? Local Imports
*/
const SidedComponent_style_1 = tslib_1.__importDefault(require("./SidedComponent.style"));
const SidedComponent = ({ style, TouchableComponent = react_native_1.TouchableOpacity, imageStyle, customComponent, imageSource = require("../../local-assets/back.png"), onPress, }) => {
const hitSlop = {
top: 8,
left: 8,
right: 8,
bottom: 8,
};
return (<TouchableComponent style={[SidedComponent_style_1.default.container, style]} hitSlop={hitSlop} onPress={onPress}>
{customComponent || (<react_native_1.Image resizeMode="contain" source={imageSource} style={[SidedComponent_style_1.default.imageStyle, imageStyle]}/>)}
</TouchableComponent>);
};
exports.default = SidedComponent;
//# sourceMappingURL=SidedComponent.js.map