Skip to content

Commit

Permalink
add token override for docs for testing purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgadewoll committed Aug 27, 2024
1 parent 3e13b75 commit 3cd2d45
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/eui/src-docs/src/views/app_context.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ export const AppContext = ({ children }) => {
const { theme } = useContext(ThemeContext);
const locale = useSelector((state) => getLocale(state));

// NOTE: temp. override solution
// TODO: remove once not needed for testing
const overrides = JSON.parse(
localStorage.getItem('eui-theme-overrides') || '{}'
);

const mappingFuncs = {
'en-xa': translateUsingPseudoLocale,
};
Expand All @@ -57,6 +63,7 @@ export const AppContext = ({ children }) => {
}}
theme={EUI_THEMES.find((t) => t.value === theme)?.provider}
colorMode={theme.includes('light') ? 'light' : 'dark'}
modify={overrides}
>
<Helmet>
<link
Expand Down

0 comments on commit 3cd2d45

Please sign in to comment.