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

[Emotion] Document usage of getters in Emotion style objects #7104

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

cee-chen
Copy link
Contributor

@cee-chen cee-chen commented Aug 20, 2023

Summary

This PR is a follow-up to #7091 (comment) which was the first PR/component to use getters in Emotion. I've decided to document the approach and update our EuiSteps styles to adopt it as well.

QA

General checklist

  • Added documentation
  • [ ] A changelog entry exists and is marked appropriately - Skipping as this should not affect consumers or end-users

@cee-chen cee-chen added documentation Issues or PRs that only affect documentation - will not need changelog entries skip-changelog tech debt labels Aug 20, 2023
@cee-chen cee-chen requested a review from a team August 20, 2023 18:58
@cee-chen cee-chen requested a review from breehall August 20, 2023 18:59
@cee-chen cee-chen marked this pull request as ready for review August 20, 2023 18:59
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_7104/

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

Copy link
Contributor

@1Copenut 1Copenut left a comment

Choose a reason for hiding this comment

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

👍 Changes looked good, no regression. I like this use of getter, it makes duplicated or carried styles easier to notice and reason about.

@cee-chen
Copy link
Contributor Author

🎉 Thanks a million Trevor! Glad to hear you're a fan of the syntax!

@cee-chen
Copy link
Contributor Author

@breehall, I'm going to go ahead and merge, but feel free to leave a comment if you have any change requests for the documentation. I'm more than happy to open up a follow-up PR

@cee-chen cee-chen merged commit 068f000 into elastic:main Aug 21, 2023
@cee-chen cee-chen deleted the emotion/getters branch August 21, 2023 15:55
@@ -262,6 +262,30 @@ Although possible in some contexts, it is not recommended to "shortcut" logic us
`${font.body.letterSpacing ? `letter-spacing: ${font.body.letterSpacing}` : ''`}`
```

## Duplicate styles
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for the guidelines and example!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues or PRs that only affect documentation - will not need changelog entries emotion skip-changelog tech debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants