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

[CSS-in-JS] useEuiTheme & withEuiTheme refactor #4594

Merged

Conversation

thompsongl
Copy link
Contributor

Summary

  • Transformed return type of useEuiTheme from an array ([ theme, colorMode, modifications ]) to an object of shape
    { euiTheme, colorMode, modifications }
  • Improved the types of withEuiTheme to clarify wrapped component props and HOC props, allowing for IDE autocomplete support for theme variables.

### Checklist

@kibanamachine
Copy link

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

@thompsongl
Copy link
Contributor Author

jenkins test this

ERROR: Failed to set up Chromium r818858! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.

@kibanamachine
Copy link

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

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

👍 LGTM! Thanks for making this change. I think it's also easier this way if they ever just need to grab the current color mode. Instead of everything.

I posted a commit that just updated the doc section wording a bit. Feel free to edit if I didn't use the right language.

@kibanamachine
Copy link

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

@thompsongl thompsongl merged commit 0e82dac into elastic:feature/css-in-js Mar 11, 2021
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.

3 participants