Skip to content

Commit 3f4caa8

Browse files
committed
Fix ESLint warning in Styles decorator
1 parent 18b1069 commit 3f4caa8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.storybook/styles-decorator.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
/* eslint-disable react-hooks/rules-of-hooks */
21
import {type StoryContext} from '@storybook/react-webpack5';
32
import {type FunctionComponent, useLayoutEffect} from 'react';
43

54
import {injectStyleSheet} from '../src/global/inject-styles';
65

7-
const stylesDecorator = (Story: FunctionComponent, context: StoryContext) => {
6+
const useStylesDecorator = (Story: FunctionComponent, context: StoryContext) => {
87
const storyStyles = context.parameters?.storyStyles;
98

109
useLayoutEffect(() => {
@@ -20,4 +19,4 @@ const stylesDecorator = (Story: FunctionComponent, context: StoryContext) => {
2019
return <Story />;
2120
};
2221

23-
export default () => stylesDecorator;
22+
export default () => useStylesDecorator;

0 commit comments

Comments
 (0)