react-papaparse icon indicating copy to clipboard operation
react-papaparse copied to clipboard

Enhancement : Making of elements headless

Open hussamkhatib opened this issue 1 year ago • 0 comments

Making Components headless to have greater control on how we can style them.

Proposed change: This is an example how this can end up. All logic is extracted in hooks and we get full control on how we style them.

const csvDownloader = useCSVDownloader();

const downloadCSV = () => {
   csvDownloader.download(data)
}

<MyCustomButton onClick={downloadCSV}>
   Download CSV 
</MyCusomButton>

Links :

  • https://tanstack.com/table/v8/docs/guide/introduction#what-is-headless-ui

hussamkhatib avatar Jul 25 '22 09:07 hussamkhatib