mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
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:
committed by
Mohamed Hegazy
parent
d0dc25c5ab
commit
a0d47c6b68
+4
-1
@@ -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>)
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user