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

Feature/centering #92

Merged
merged 9 commits into from
Jun 4, 2019
Merged

Feature/centering #92

merged 9 commits into from
Jun 4, 2019

Conversation

lbebber
Copy link
Contributor

@lbebber lbebber commented Jun 4, 2019

What is the purpose of this pull request?

Adds functionality to force centering elements on header, by way of the new header-force-center block.

View here: (used on the logo, which is centered regardless of the content by its side) https://lbebber4--storecomponents.myvtex.com/

What problem is this solving?

How should this be manually tested?

Screenshots or example usage

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

const ForceCenter = ({ children }) => (
<div
className="absolute left-0 right-0 flex justify-center z-1"
style={{ pointerEvents: 'none' }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is that? Just out of curiosity

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because it creates a transparent div with 100% of the width, which might cover elements behind it and render the user unable to click through


const ForceCenter = ({ children }) => (
<div
className="absolute left-0 right-0 flex justify-center z-1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we add a css handle?

Copy link

@arthurepc arthurepc left a comment

Choose a reason for hiding this comment

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

LGTM

@lbebber lbebber merged commit d80f6e1 into master Jun 4, 2019
@lbebber lbebber deleted the feature/centering branch June 4, 2019 14:53
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.

None yet

3 participants