nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - Image behave conflict with tailwind when using object-cover

Open undefine-man opened this issue 1 year ago • 4 comments

NextUI Version

2.0.27

Describe the bug

Image in NextUI can't use tailwind object-cover. I have to use 'removeWrapper' flag to make it behave properly.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

better see screenshots and videos

Expected behavior

i expected it to support object-cover .

Screenshots or Videos

image https://github.com/nextui-org/nextui/assets/24623544/e3ac04b7-c919-4707-a03b-b0843db652af

have to use removeWrapper flag to make it work properly. image

https://github.com/nextui-org/nextui/assets/24623544/d0446c1b-f3dc-4f1a-93fc-5cc4107c179e

Operating System Version

Windows

Browser

Edge

undefine-man avatar May 24 '24 22:05 undefine-man

i found the <Image> use a <div> wrap it real <img>, i think it expose a prop on <Image> can make object-fit property pass to its children whick real <img> inside the wrapper <div>

undefine-man avatar May 25 '24 18:05 undefine-man

do you mean you want to add object-cover to <img />?

wingkwong avatar May 26 '24 10:05 wingkwong

do you mean you want to add object-cover to <img />?

yes, i think it shoud be a basic property

undefine-man avatar May 28 '24 02:05 undefine-man