add package @storybook/addon-notes

This commit is contained in:
Joscha Feth
2017-06-23 01:22:36 +02:00
parent 4ed565766b
commit 2446ec4afb
4 changed files with 58 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
// Type definitions for @storybook/addon-notes 3.0
// Project: https://github.com/storybooks/storybook
// Definitions by: Joscha Feth <https://github.com/joscha>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TODO: Once TS2.3 is released,
// https://github.com/Microsoft/TypeScript/issues/14819 should be fixed.
// Then, upgrade this package's typescript version to 2.3 and
// Remove the `declare module` wrapper.
// tslint:disable-next-line no-single-declare-module
declare module '@storybook/addon-notes' {
import * as React from 'react';
interface WithNotesProps extends React.HTMLProps<HTMLDivElement> {
notes?: string;
}
const WithNotes: React.StatelessComponent<WithNotesProps>;
}
@@ -0,0 +1,13 @@
/// <reference types="storybook__react" />
import * as React from 'react';
import { storiesOf } from '@storybook/react';
import { WithNotes } from '@storybook/addon-notes';
storiesOf('Component', module)
.add('with some emoji', () => (
<WithNotes notes={'A very simple component'}>
my component
</WithNotes>
));
@@ -0,0 +1,24 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"dom",
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"jsx": "react",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"storybook__addon-notes-tests.tsx"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }