Skip to content

Commit fa45856

Browse files
authoredJan 22, 2024
Fix Storybook type annotations (#1091)
## What are you changing? - Updates type annotations in Source Storybook stories. ## Why? - All of the stories have a number of type errors. Whilst these (mostly) don't prevent the stories from running or rendering in Chromatic, the errors create a lot of visual noise in the code editor and can cause confusion when working on them.

File tree

57 files changed

+1040
-689
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1040
-689
lines changed
 

‎libs/@guardian/source-react-components-development-kitchen/.storybook/preview/FocusManagerDecorator.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { useEffect } from 'react';
22
import { FocusStyleManager } from '@guardian/source-foundations';
3+
import { Decorator } from '@storybook/react';
34

4-
export const FocusManagerDecorator = (storyFn) => {
5+
export const FocusManagerDecorator: Decorator = (storyFn) => {
56
useEffect(() => {
67
FocusStyleManager.onlyShowFocusOnTabs();
78
});

‎libs/@guardian/source-react-components-development-kitchen/.storybook/preview/ThemeProviderDecorator.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ThemeProvider } from '@emotion/react';
2+
import { Decorator } from '@storybook/react';
23

3-
export const ThemeProviderDecorator = (storyFn, context) => {
4+
export const ThemeProviderDecorator: Decorator = (storyFn, context) => {
45
const theme = context.parameters.theme;
56
return theme ? (
67
<ThemeProvider theme={theme}>{storyFn()}</ThemeProvider>

0 commit comments

Comments
 (0)
Please sign in to comment.