@nexara/nativeflow
Version:
Beautiful, responsive, and customizable UI components for React Native – built for performance and seamless experiences.
38 lines (37 loc) • 1.01 kB
JavaScript
;
import React from 'react';
import { StyleSheet } from "react-native";
import { verticalScale } from "../../helpers/ResponsiveCalculations.js";
import { StyledView } from "../StyledComponents/index.js";
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
const Slider = ({
value = 50,
size = 5,
trackColor = '#645E64',
progressColor = '#fff'
}) => {
const STYLES = StyleSheet.create({
TRACK: {
backgroundColor: trackColor
// borderRadius: moderateScale(100),
// overflow: 'hidden'
},
TRACK_ITEM: {
backgroundColor: progressColor,
height: verticalScale(size),
width: `${value}%`
// borderRadius: moderateScale(100)
}
});
return /*#__PURE__*/_jsx(_Fragment, {
children: /*#__PURE__*/_jsx(StyledView, {
f: 1,
style: STYLES.TRACK,
children: /*#__PURE__*/_jsx(StyledView, {
style: STYLES.TRACK_ITEM
})
})
});
};
export default Slider;
//# sourceMappingURL=Slider.js.map