tajo / react-range

🎚️Range input with a slider. Accessible. Bring your own styles and markup.
https://react-range.pages.dev
MIT License
859 stars 97 forks source link

extract param type definitions into own interface #154

Closed fwiech closed 3 years ago

fwiech commented 3 years ago

Thank you for providing this helpful utility!

In our project we use typescript and define the renderThumb component outside of the jsx template. Here it would be great to be able to use the type definitions provided by the library:

exort const MyComponent () => {
  const renderThumb = (params: IRenderThumbParams) => { // here we want to use the type definition
    // ...
  }

  return (
    <Range
      // ...
      renderThumb={renderThumb}
    />
  )
}