-
Describe the bug To Reproduce
Error Stack Expected behavior Screenshots Desktop (please complete the following information):
Additional context I'm building my sie with Nxt.js 13. |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 4 replies
-
Please come up with an example, you can use codesandbox to provide an example. BTW: the package name is wrong, it is |
Beta Was this translation helpful? Give feedback.
-
Yes sorry my bad, tried a fork to see if it would make a different but it didn't. I've just tried to create a Sandbox but getting a different error regarding React an the library. Have to leave my computer now unfortunately but will try to share a working sandbox tomorrow. |
Beta Was this translation helpful? Give feedback.
-
Ok, so I've tried figuring out what's going on with the sandbox but to no avail. This is the error I'm getting (you could see it in the sandbox link I've attached as well). Have you tried working with your library on Next.js? I'm not sure why it should make any difference, but wondering if it might. |
Beta Was this translation helpful? Give feedback.
-
Ok, so I've created a SandBox with a simple React project, and it works just fine. I simply copy pasted the same code I've copy-pasted here, from my code, and the same one I've used for the SandBox I posted earlier. For a moment I thought I figured it our by adding |
Beta Was this translation helpful? Give feedback.
-
The problem is with your Codesandbox: https://codesandbox.io/p/sandbox/nifty-glade-623wk8?file=%2Fapp%2Fglobals.css%3A7%2C27 |
Beta Was this translation helpful? Give feedback.
-
It wasn't even that, looked like it didn't initiate the repo properly or something. I tried to comment it out and was still getting the same error. I've started a new sandbox and it then worked out of the box. I'll report back if I see it's something to warn others about. |
Beta Was this translation helpful? Give feedback.
-
EDIT: Again, I've experienced some inconsistencies. You can ignore point 2 as it seems that importing Ok, so I've done more testing and this is what I came up with so far:
Tailwind being the popular library that it is, I think it's pretty important for this library to work together with it in the same project.
I find it odd, that to make the component show, either this line needs to be removed, or tailwinds base styles, as this line is written with plain inline styling and should have nothing to do with tailwind's "className" based styling, as far as I understand. Maybe you can make more sense of it @NishargShah |
Beta Was this translation helpful? Give feedback.
-
Ok, I will look into it, what is the actual issue, thanks for the help. |
Beta Was this translation helpful? Give feedback.
-
@NishargShah I found the source of the problem and the solution. As mentioned, the issue was with applying The style that was causing this issue is the default image maxWidth:
I've copied the library to play with it, and the way to fix this issue is simply adding
When this is added everything works just fine. |
Beta Was this translation helpful? Give feedback.
@NishargShah I found the source of the problem and the solution.
As mentioned, the issue was with applying
@tailwind base
.When doing so, we were applying some base styles which could be found in the preflight file right here.
The style that was causing this issue is the default image maxWidth:
I've copied the library to play with it, and the way to fix this issue is simply adding
maxWidth:"none",
toimgNonResponsive
instyles.ts
.When this is added everything works just fine.