Using ref to calculate the width of the sticky and dynamically calculate the scrollIndex
- Now takes ref to calculate the width.
- Now takes ref and calculate the scrollIndex ~ at what scroll index to make it sticky, Also can pass the index as well.
- Can pass css class to make sticky custom position as top, bottom, left and right side of the page.