Skip to content

Commit

Permalink
liiiiiiiint
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonStoltz committed Jul 13, 2024
1 parent 998d12f commit 3d927ba
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
4 changes: 3 additions & 1 deletion packages/eui/src-docs/src/views/app_context.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export const AppContext = ({ children }) => {
const isLocalDev = window.location.host.includes('803');
setEuiDevProviderWarning(isLocalDev ? 'error' : 'warn'); // Note: this can't be in a useEffect, otherwise it fires too late for style memoization warnings to error on page reload

const overrides = JSON.parse(localStorage.getItem('kbn-theme-overrides') || '{}');
const overrides = JSON.parse(
localStorage.getItem('kbn-theme-overrides') || '{}'
);

return (
<EuiProvider
Expand Down
32 changes: 22 additions & 10 deletions packages/eui/src-docs/src/views/theme/customizing/values.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,32 @@ export default () => {
<EuiBottomBar position="sticky">
<EuiFlexGroup responsive={false} justifyContent="flexEnd">
<EuiFlexItem grow={false}>
<EuiButton onClick={() => {
const overridesJSON = JSON.stringify(overrides || {}, null, 2)
localStorage.setItem('kbn-theme-overrides', overridesJSON);
location.reload();
}} fill iconType="copyClipboard">
<EuiButton
onClick={() => {
const overridesJSON = JSON.stringify(
overrides || {},
null,
2
);
localStorage.setItem('kbn-theme-overrides', overridesJSON);
location.reload();
}}
fill
iconType="copyClipboard"
>
Apply to local storage
</EuiButton>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton onClick={() => {
const overridesJSON = JSON.stringify({}, null, 2)
localStorage.setItem('kbn-theme-overrides', overridesJSON);
location.reload();
}} fill iconType="copyClipboard">
<EuiButton
onClick={() => {
const overridesJSON = JSON.stringify({}, null, 2);
localStorage.setItem('kbn-theme-overrides', overridesJSON);
location.reload();
}}
fill
iconType="copyClipboard"
>
Reset local storage
</EuiButton>
</EuiFlexItem>
Expand Down

0 comments on commit 3d927ba

Please sign in to comment.