digdir / designsystemet

Designsystemet
https://designsystemet.no
MIT License
68 stars 34 forks source link

Modal has wrong padding-bottom when Footer is removed #2063

Open Thuneer opened 1 month ago

Thuneer commented 1 month ago

Description of the bug

When the Footer of the Modal component is removed the padding on the bottom is wrong in code. Should be equal all the way around.

Steps To Reproduce

Codesandbox: https://codesandbox.io/p/sandbox/laughing-currying-7wypvf

Additional Information

No response

Barsnes commented 1 month ago

We would need to remove the padding-top on footer, but I don't see this a problem 🤔 When you use a header or a footer, content is in 99% of the cases there - so we can make some assumptions and move all the padding to Modal.Content.

We also have the possibility to extend the css, and check for what siblings the dialog has