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

Allow us to set width for the color picker #949

Open
Nefcanto opened this issue Nov 14, 2024 · 2 comments
Open

Allow us to set width for the color picker #949

Nefcanto opened this issue Nov 14, 2024 · 2 comments

Comments

@Nefcanto
Copy link

Look at this form:

image

I know I can create a parent component and only show the selected color and when clicked open the color picker. I also know that I can create a simple dialog where people would choose the color.

But I prefer to show the color picker inline due to some constraints related to this specific app.

If I could add className="w-full" then everything would be OK.

Allow us to specify the width for this component to be able to align it nicely when we use it inline.

@vakharia-aarya
Copy link

I'm pretty sure the Sketch component has a width prop, you could set it dynamically depending on your page dimensions to get the desired behavior. Check the api definition in the docs: https://casesandberg.github.io/react-color/#api-individual

@Nefcanto
Copy link
Author

@vakharia-aarya, thank you for that tip. Yet the width property won't help in this case. Because it's a fluid design. I don't know the width of the container form. I need to just tell it take the entire space available.

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