fix(Header, Cards, Hero): fix spacings logic#1298
Conversation
| </div> | ||
| )} | ||
| {headline && ( | ||
| // assuming that the headline will always be followed by one of: pretitle, title, subtitle, description |
There was a problem hiding this comment.
All cards were assuming this before, except of AdvancedDataCard. In #1292, I've done the same for the AdvancedDataCard, and it broke one screenshot test in webapp (they use headline and extra prop to render everything else).
I've removed all these unnecesary assumptions from everywhere
|
Size stats
|
| {headlineContent} | ||
| {pretitleContent && ( | ||
| <div style={{paddingBottom: pretitle || description ? 8 : 0, order: -1}}> | ||
| <div style={{paddingBottom: title || description ? 8 : 0, order: -1}}> |
There was a problem hiding this comment.
This was a typo :(
|
Accessibility report ℹ️ You can run this locally by executing |
|
Deploy preview for mistica-web ready! ✅ Preview Built with commit 5906817. |
## [16.6.1](v16.6.0...v16.6.1) (2024-11-26) ### Bug Fixes * **Header, Cards, Hero:** fix spacings logic ([#1298](#1298)) ([327ac5f](327ac5f))
|
🎉 This PR is included in version 16.6.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
With these fixes, the only screenshot failing in webapp is this one:
But this is expected (and it was incorrect before). This is a DataCard with headline + extra. According to card specs, there is no space between pre-defined content and extra slot: