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] Create hook utility for memoizing component styles per-theme #7529

Merged
merged 9 commits into from
Feb 15, 2024
Prev Previous commit
Next Next commit
[REVERT ME] console.log to show number of code style calls
  • Loading branch information
cee-chen committed Feb 14, 2024
commit cd77f3ad8af9be17660b1a2509f0dd8b3d6c0740
2 changes: 2 additions & 0 deletions src/components/code/code_syntax.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const visColors = euiPaletteColorBlind();

// These variables are computationally expensive - do not call them outside `useEuiMemoizedStyles`
export const euiCodeSyntaxVariables = ({ euiTheme }: UseEuiTheme) => {
console.log('euiCodeSyntaxVariables() fired'); // REVERT ME

const backgroundColor = euiTheme.colors.lightestShade;

return {
Expand Down
Loading