YYsuni / react18-json-view

JSON viewer for react18
https://jv.yysuni.com/
MIT License
236 stars 15 forks source link

Layout shifts when line-height is unset #24

Open mia1024 opened 8 months ago

mia1024 commented 8 months ago

Hi,

Thank you so much for this. I just want to bring to your attention that, when line-height is unset, the layout shifts wildly on hover. It looks like your website sets it to 1.5em but this doesn't come with the packaged stylesheet. See the gif below:

2023-10-18 15 18 25

Produced by the following code with version 0.2.6 of react18-json-view

import { createRoot } from "react-dom/client";
import JsonView from "react18-json-view";
import "react18-json-view/src/style.css";

createRoot(document.getElementById("root")!).render(
    <JsonView src={{ a: 1, b: { c: 2 } }} displaySize="collapsed" />,
);
YYsuni commented 8 months ago

Oh, I usually use Tailwindcss in my projects , thanks for the reminder. ❤️

YYsuni commented 8 months ago

I have just refined and published the new canary version. 😄