react-native-awesome-slider icon indicating copy to clipboard operation
react-native-awesome-slider copied to clipboard

Custom step layout issue

Open Resource-4 opened this issue 6 months ago • 0 comments

Expected OUTPUT :- image

Current OUTPUT :- image

How to apply padding/margin before starting the step and ending the step after that sync position of the Thumb in the center?

    <Slider
        style={{ marginHorizontal: 10, borderRadius: 30 }}
        progress={progress}
        minimumValue={min}
        maximumValue={max}
        step={10}
        renderMark={() => {
          return (
            <View
              style={{
                height: 15,
                borderRadius: 30,
                backgroundColor: Color.GRAYSCALE,
                borderWidth: 2,
                borderColor: Color.GRAYSCALE,
              }}
            />
          );
        }}
        theme={{
          maximumTrackTintColor: Color.GRAYSCALE,
          minimumTrackTintColor: Color.GRAYSCALE,
          cacheTrackTintColor: Color.GRAYSCALE,
        }}
        thumbWidth={30}
        renderThumb={() => {
          return (
            <View
              style={{
                width: 24,
                height: 24,
                borderRadius: 12,
                backgroundColor: Color.VERMILION,
              }}
            />
          );
        }}
        renderBubble={() => {
          return <></>;
        }}
        snapToStep={true}
      />

Resource-4 avatar Aug 27 '24 11:08 Resource-4