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

Usage examples #54

Open
ryancwalsh opened this issue Oct 16, 2022 · 2 comments
Open

Usage examples #54

ryancwalsh opened this issue Oct 16, 2022 · 2 comments

Comments

@ryancwalsh
Copy link

Thanks so much for offering this library!

I was wondering if you could link to a working demo, maybe at Codesandbox or somewhere.

From the Readme, I haven't been able to figure out how to get this working.

If I use <EyeDropper pickRadius={1} onChange={onChange} /> and

function onChange({ rgb, hex }) {
    console.log({ hex });
  }

Then I just see a black oval, and clicking it just logs hex: '#000000' but never opens an eyedropper.

Thanks.

@ryancwalsh
Copy link
Author

Ahh, I found your example at

import { EyeDropper, OnChangeEyedrop, useEyeDrop } from './package'
which was helpful.

It would probably still be nice to have a more prominent live demo linked from the Readme.

But for me, I've got it working now. I appreciate it!

@jodhman
Copy link
Owner

jodhman commented Oct 17, 2022

Hello @ryancwalsh! I'm pleased to see you managed to make it work.
I'll take your suggestion to heart and will add a CodeSandbox link to the README. 🙌

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

2 participants