diff --git a/types/storybook__addon-notes/index.d.ts b/types/storybook__addon-notes/index.d.ts index 4ba96ed38f..c5af7a9134 100644 --- a/types/storybook__addon-notes/index.d.ts +++ b/types/storybook__addon-notes/index.d.ts @@ -1,10 +1,13 @@ -// Type definitions for @storybook/addon-notes 3.0 +// Type definitions for @storybook/addon-notes 3.3.3 // Project: https://github.com/storybooks/storybook // Definitions by: Joscha Feth // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 import * as React from 'react'; +import { RenderFunction } from '@storybook/react'; + +export function withNotes(textOrOptions: string | object): (getStory: RenderFunction) => RenderFunction; export interface WithNotesProps extends React.HTMLProps { notes?: string; diff --git a/types/storybook__addon-notes/storybook__addon-notes-tests.tsx b/types/storybook__addon-notes/storybook__addon-notes-tests.tsx index efd71d9771..2ad783cc5d 100644 --- a/types/storybook__addon-notes/storybook__addon-notes-tests.tsx +++ b/types/storybook__addon-notes/storybook__addon-notes-tests.tsx @@ -1,11 +1,16 @@ import * as React from 'react'; import { storiesOf } from '@storybook/react'; -import { WithNotes } from '@storybook/addon-notes'; +import { withNotes, WithNotes } from '@storybook/addon-notes'; storiesOf('Component', module) .add('with some emoji', () => ( my component - )); + )) + .add('with withNotes', + withNotes('A very simple component')( + () => (
my component
) + ) + );