react-native-hook-image-slider
Version:
React Native Image Slider UI component built with react hooks
31 lines • 1.12 kB
JavaScript
;
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const React = __importStar(require("react"));
const react_native_1 = require("react-native");
// TODO change to something lightweight
const Dot = ({ active, emptyDotColor, activeDotColor }) => {
return <react_native_1.View style={[styles(emptyDotColor, activeDotColor).badge, active && styles(emptyDotColor, activeDotColor).active]}/>;
};
const styles = (emptyDotColor, activeDotColor) => react_native_1.StyleSheet.create({
badge: {
borderRadius: 50,
borderColor: emptyDotColor,
backgroundColor: emptyDotColor,
borderWidth: 2,
width: 20,
height: 20,
marginRight: 7,
},
active: {
backgroundColor: activeDotColor,
},
});
exports.default = Dot;
//# sourceMappingURL=index.js.map