react-scrollbars-custom icon indicating copy to clipboard operation
react-scrollbars-custom copied to clipboard

Top and Bottom margin for the track

Open krngd2 opened this issue 2 years ago • 1 comments

I am looking to have a feature similar to this image

I tried using padding to the track it only restricts the thumb movement. It would be great if it has proper track gap in top and bottom.

If the contributors are busy, let me know how can I do it as an outline. I will try to do it.

krngd2 avatar Apr 13 '22 06:04 krngd2

I think this can already be done by setting top and height of the track, e.g.

<Scrollbar
  trackYProps={{
    style: {
      top: scrollbarGapTop,
      height: `calc(100% - ${scrollbarGapTop + scrollbarGapBottom}px)`,
    }
  }}
>

GREsau avatar Nov 17 '22 11:11 GREsau