Skip to content

Commit

Permalink
remove temporary fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanWatanabe committed Jun 25, 2021
1 parent b0d14fa commit 060fd1a
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions apps/vr-tests/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,6 @@ setAddon({

export const parameters = { layout: 'none' };

/**
* @type {import('@storybook/react').Meta['decorators']}
*/
export const decorators = [removeCanvasInlineStyles];

/**
* Temporary solution to remove inline styles injected by new default SB layout (https://storybook.js.org/docs/react/configure/story-layout)
* TODO - remove this once we migrate to SB 6.1
* @see https://github.com/storybookjs/storybook/issues/12041#issuecomment-717177177
* @param {Parameters<import('@storybook/react').Meta['decorators'][number]>[0]} Story
*/
function removeCanvasInlineStyles(Story) {
document.body.removeAttribute('style');
return createElement(Story);
}

// For static storybook per https://github.com/screener-io/screener-storybook#testing-with-static-storybook-app
if (typeof window === 'object') {
/** @type {*} */ (window).__screener_storybook__ = require('@storybook/react').getStorybook;
Expand Down

0 comments on commit 060fd1a

Please sign in to comment.