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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

<Image />: Styles API doesn't work when using imageProps #3985

Closed
SomiDivian opened this issue Apr 3, 2023 · 1 comment
Closed

<Image />: Styles API doesn't work when using imageProps #3985

SomiDivian opened this issue Apr 3, 2023 · 1 comment

Comments

@SomiDivian
Copy link

What package has an issue

@mantine/core

Describe the bug

imageProps prop overrides everything you setup before

      <Image
        src={url}
        height={250} // 馃憟
        width={250} // 馃憟
        styles={{
          image: {
            objectFit: 'cover', // 馃憟
          }
        }}
        imageProps={{
          style: {
            border: '5px tomato solid'
          }
        }}
      />

What version of @mantine/hooks page do you have in package.json?

6.0.4

If possible, please include a link to a codesandbox with the reproduced problem

https://codesandbox.io/s/nostalgic-herschel-t1jvpo

Do you know how to fix the issue

Yes

Are you willing to participate in fixing this issue and create a pull request with the fix

Yes

Possible fix

why not deep-merge the styles?

@rtivital
Copy link
Member

rtivital commented Apr 4, 2023

Fixed in 6.0.6

@rtivital rtivital closed this as completed Apr 4, 2023
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

No branches or pull requests

2 participants