Skip to content

Commit

Permalink
change dependencies / move variables
Browse files Browse the repository at this point in the history
  • Loading branch information
opauloh committed Nov 9, 2021
1 parent 23aa647 commit 272f53c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ interface StylesDeps {

export const useStyles = ({ depth }: StylesDeps) => {
const { euiTheme } = useEuiTheme();
const { colors, border, font, size } = euiTheme;

const cached = useMemo(() => {
const { colors, border, font, size } = euiTheme;

const darkText: CSSObject = {
color: colors.text,
};
Expand Down Expand Up @@ -136,7 +137,7 @@ export const useStyles = ({ depth }: StylesDeps) => {
workingDir,
userEnteredIcon,
};
}, [depth, colors, border, font, size]);
}, [depth, euiTheme]);

return cached;
};

0 comments on commit 272f53c

Please sign in to comment.