Update storybook__addon-notes (#22669)

* Update storybook__addon-notes

This implementation is deprecated in version 3.3.3

* Update storybook__addon-notes-tests.tsx
This commit is contained in:
Munir Ahmed Elsangedy
2018-01-04 14:06:31 -08:00
committed by Mohamed Hegazy
parent d0dc25c5ab
commit a0d47c6b68
2 changed files with 11 additions and 3 deletions
+4 -1
View File
@@ -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 <https://github.com/joscha>
// 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<HTMLDivElement> {
notes?: string;
@@ -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', () => (
<WithNotes notes={'A very simple component'}>
my component
</WithNotes>
));
))
.add('with withNotes',
withNotes('A very simple component')(
() => (<div>my component</div>)
)
);