mia-platform / design-system

React graphical components designed by Mia Platform
https://mia-platform.github.io/design-system/
Apache License 2.0
13 stars 1 forks source link

fix(Modal): aside height calculated incorrectly #700

Closed GiovannaMonti closed 2 weeks ago

GiovannaMonti commented 2 weeks ago

Description

This PR introduces a fix on the Modal component regarding the height of the aside element.

The Storybook setup did not contain any CSS reset file; this means that the box-sizing property was implicitly set to content-box for certain elements. The aside element is an example of this: setting its height to 100% would result in it taking its container's height plus its own vertical padding.

Modal

image

[IMPORTANT] PR Checklist

PR conventions

Please make sure your PR complies with the following rules before submitting it.

Additional code checks

Based on your changes, some of these checks may not apply. Please make sure to check the relevant items in the list.

GiovannaMonti commented 2 weeks ago

I have a doubt. Reset should be imported from ThemeProvider of them.tsx inside storybook decorators, no?

the reset is intended to be applied to storybook stories; here is the recommendation on how to do so: https://storybook.js.org/docs/configure/styling-and-css#import-bundled-css-recommended