Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement : Making of elements headless #136

Open
hussamkhatib opened this issue Jul 25, 2022 · 0 comments
Open

Enhancement : Making of elements headless #136

hussamkhatib opened this issue Jul 25, 2022 · 0 comments

Comments

@hussamkhatib
Copy link
Contributor

hussamkhatib commented Jul 25, 2022

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 :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant