jotaijs / jotai-devtools

A powerful toolkit to enhance your development experience with Jotai
https://jotai.org/docs/tools/devtools
MIT License
124 stars 29 forks source link

feat: add position option #118

Closed hyoban closed 8 months ago

hyoban commented 8 months ago

This helps us customize the style

codesandbox-ci[bot] commented 8 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit cf70e30b5e74b958c81bfb16a18ce5cd35625d49:

Sandbox Source
React Configuration
React TypeScript Configuration
arjunvegda commented 8 months ago

Hey @hyoban

Thanks for the PR! 🙌 Does overriding .jotai-devtools-trigger-button in your application not work? We expose jotai-devtools-shell too, if you'd like to add minor styles to the shell.

hyoban commented 8 months ago

Hey @hyoban

Thanks for the PR! 🙌 Does overriding .jotai-devtools-trigger-button in your application not work? We expose jotai-devtools-shell too, if you'd like to add minor styles to the shell.

Yes, I'm using this method now, it works. But with tailwind, it will be more convenient if you can pass the classname.

arjunvegda commented 8 months ago

Hey @hyoban Thanks for the PR! 🙌 Does overriding .jotai-devtools-trigger-button in your application not work? We expose jotai-devtools-shell too, if you'd like to add minor styles to the shell.

Yes, I'm using this method now, it works. But with tailwind, it will be more convenient if you can pass the classname.

What sort of CSS overrides do you need? Trying to understand the use case better. We'd want to limit the customizability via new class names. Also, I am not sure if supplying the same className for Trigger and Shell is a good idea.

hyoban commented 8 months ago

What sort of CSS overrides do you need? Trying to understand the use case better.

The main thing is the location and size. Maybe it would be more convenient to drag and zoom as we need.

We'd want to limit the customizability via new class names. Also, I am not sure if supplying the same className for Trigger and Shell is a good idea.

Yeah I just realized that. Provide two different classname?

arjunvegda commented 8 months ago

The main thing is the location and size. Maybe it would be more convenient to drag and zoom as we need.

Got it! I think, for now, we'd want to limit overriding the class names. Could you please work with the ones that we provide out of the box instead of accepting them as props?

For the current PR, could you please update it to only include position logic? That sounds like something we'd love to support out of the box. And of course, happy to accept PRs for the drag/drop feature too.

arjunvegda commented 8 months ago

Could you also update the readme.md file with this prop?

hyoban commented 8 months ago

@arjunvegda Updated

arjunvegda commented 8 months ago

I'll release this shortly! Thanks again for your contribution!

murfidaz commented 6 months ago

hello, when will this feature be released?

arjunvegda commented 6 months ago

Thanks for your patience, this change has been released as part of 0.8.0 🎉