Skip to content
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

fix: resetPaddings for base-block #756

Merged
merged 4 commits into from
Dec 15, 2023
Merged

fix: resetPaddings for base-block #756

merged 4 commits into from
Dec 15, 2023

Conversation

niktverd
Copy link
Contributor

No description provided.

NikitaCG
NikitaCG previously approved these changes Dec 14, 2023
@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@@ -30,7 +31,8 @@ export const ConstructorBlock: React.FC<WithChildren<ConstructorBlockProps>> = (
[data],
);

const {top, bottom} = indent || {top: 'l', bottom: 'l'};
const {top, bottom} =
indent || data.resetPaddings ? {top: '0', bottom: '0'} : {top: 'l', bottom: 'l'};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds like we should move all the indent logic to BlockBase component and handle it like other base block properties like anchor or resetPaddings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree

@niktverd niktverd merged commit 03ab2ee into main Dec 15, 2023
3 checks passed
@niktverd niktverd deleted the fix_reset_paddings branch December 15, 2023 11:45
qradle-yndx pushed a commit that referenced this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants