Skip to content

Commit

Permalink
Merge pull request #187 from jackw/use-globals
Browse files Browse the repository at this point in the history
Fix: Storybook preset loading error
  • Loading branch information
hipstersmoothie authored Sep 14, 2022
2 parents 9383a62 + ff305f7 commit 98eb047
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"dependencies": {
"fast-deep-equal": "^3.0.0",
"global": "^4.4.0",
"memoizerific": "^1.11.3"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions src/Tool.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import global from 'global';
import { themes, ThemeVars } from '@storybook/theming';
import { IconButton } from '@storybook/components';
import {
Expand All @@ -16,6 +17,7 @@ import {
import Sun from './icons/Sun';
import Moon from './icons/Moon';

const { document, window } = global;
const modes = ['light', 'dark'] as const;
type Mode = typeof modes[number];

Expand Down
1 change: 1 addition & 0 deletions typings/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module 'global';

0 comments on commit 98eb047

Please sign in to comment.