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 customizing editor min height and width #30

Open
grahamhoyes opened this issue Feb 26, 2024 · 0 comments · May be fixed by #31
Open

Allow customizing editor min height and width #30

grahamhoyes opened this issue Feb 26, 2024 · 0 comments · May be fixed by #31

Comments

@grahamhoyes
Copy link

Feature request

Use Case

I've started integrating this widget into an unfold-based admin site. For small (or empty) data, the min-height: 480px on .svelte-jsoneditor-wrapper leaves quite the large UI gap:

image

Current state

The .svelte-jsoneditor-wrapper class leaves a large UI gap, as well as inconsistent widths with other elements

Proposed Solution

There are a few ways around this I could see:

  • Just remove min-height from .svelte-jsoneditor-wrapper, though there may be use cases where it's warranted. Still leaves the issue with the hard-coded width as well
  • I could provide my own CSS / override the template to change the CSS class definition
  • Making the class list customizable would be ideal. Default to .svelte-jsoneditor-wrapper for backwards compatibility, but would allow me to set eg w-full max-w-2xl from tailwind which gives a seamless UI as seen below

image

I'm happy to help make these changes!

@grahamhoyes grahamhoyes linked a pull request Feb 26, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant