-
Notifications
You must be signed in to change notification settings - Fork 10
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Header): small version, allow removing vertical padding #822
Conversation
Size stats
|
Accessibility report ℹ️ You can run this locally by executing |
Deploy preview for mistica-web ready! ✅ Preview Built with commit 274be5e. |
@@ -19,6 +20,26 @@ const colorProperties = defineProperties({ | |||
|
|||
const sizes = [0, 2, 4, 8, 12, 16, 20, 24, 32, 40, 48, 56, 64, 72, 80] as const; | |||
|
|||
const responsiveProperties = defineProperties({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this allows us using responsive padding sprinkles:
sprinkles({padding: {mobile: 8, desktop: 16}})
<ResponsiveLayout isInverse={isInverse}> | ||
<ResponsiveLayout | ||
isInverse={isInverse} | ||
dataAttributes={{'component-name': 'MainSectionHeaderLayout', ...dataAttributes}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can use getPrefixedDataAttributes
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, that would be wrong. That's already done internally in ResponsiveLayout
# [14.18.0](v14.17.1...v14.18.0) (2023-07-20) ### Bug Fixes * **DisplayMediaCard, PosterCard:** add label to video control ([#823](#823)) ([dc765ef](dc765ef)) * **row:** add missing dataAttributes ([#815](#815)) ([47e7cab](47e7cab)) ### Features * **AdvancedDataCard:** new community component ([#780](#780)) ([2803b9c](2803b9c)) * **Blocks:** new Mistica Community Components ([#770](#770)) ([8fc368a](8fc368a)) * **Header:** small version, allow removing vertical padding ([#822](#822)) ([448387e](448387e)) * **Nakedcard:** new component ([#819](#819)) ([688bb8e](688bb8e))
🎉 This PR is included in version 14.18.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Jira with specs: https://jira.tid.es/browse/WEB-1469
small
prop inHeader
to reduce the title/description font sizenoPaddingY
prop toHeaderLayout
to remove the vertical padding (required by Novum CMS layout, which establishes its own paddings)Stack
andBox
components:When using the responsive notation (object), setting both
mobile
anddesktop
is mandatory.tablet
is optional, and will usemobile
value by default when not specified.This will allow us to reduce the use of
useScreenSize()
hook, which is problematic with SSR.In this PR I've applied this to header components, but we should do the same with the rest of components in Mística too. It's still pending to apply the same approach in
Inline
component