Skip to content

Next JS Demo with Custom hook #546

@John-Flavian

Description

@John-Flavian

Motivation

love of the project.

Proposal

I noticed that it was kinda difficult for me to use the package in my recent app; I devised a way to use a custom hook with the smooth scrollbar package. View this demo in smaller devices here

`
import useScroll from "./useScroll";

const BillingsTable = () => {
const docRef = useRef(null);
const options = {
damping: 0.2, // Adjust the damping effect
thumbMinSize: 5, // Set a minimum size for the thumb
renderByPixels: true, // Ensure pixel-based scrolling
alwaysShowTracks: false, // Show scrollbar tracks always
continuousScrolling: true, // Enable continuous scrolling
};

useScroll(docRef, options);

return (

) `

I have set up a local working demo in my PC; I will like to contribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions