mantinedev / mantine

A fully featured React components library
https://mantine.dev
MIT License
26.1k stars 1.85k forks source link

Shadow prop on Paper component #6743

Open devalirzayev opened 2 weeks ago

devalirzayev commented 2 weeks ago

Hi @rtivital.

It says "shadow" prop is "none" by default, but it applies shadow when I don't set it. Is there something I have missed in documentation, or it could be a bug?

https://github.com/mantinedev/mantine/blob/133b7bf0c739c865e299e4886b22e086d975bd0b/packages/%40mantine/core/src/components/Paper/Paper.tsx#L23

Thanks for a great library!

rtivital commented 2 weeks ago

I do not see any shadow on Paper component – https://codesandbox.io/p/sandbox/mantine-react-template-forked-k4lv26?file=%2Fsrc%2FApp.tsx%3A10%2C9&workspaceId=dd881b63-29f6-464c-bcdf-b5f78ad65b26

devalirzayev commented 2 weeks ago

Please see this one: https://codesandbox.io/p/sandbox/mantine-react-template-forked-kq2rks?file=%2Fsrc%2FApp.tsx%3A10%2C36

My guess is if a parent Paper component has a shadow, it will pass to children as --paper-shadow variable is declared in scope. I can see this is not something easy to change. But would like to know if this is intended (and why) or a bug that is not prioritized. If it is a bug, I would like to work on it.

Kenzo-Wada commented 5 days ago

At this case, I think you should use Card component(a wrapper component of Paper) because Paper is a polymorphic component and it is mainly used inside custom component. WDYT?