[storybook-readme] Add new feature importing addReadme from html (#35380)

* Add new feature importing addReadme from html

* Fix  lint

* Fix test errors
This commit is contained in:
Taeheon Kim 2019-05-15 03:27:45 +09:00 committed by Nathan Shively-Sanders
parent ed9f3a7454
commit 3b625a5f37
3 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,3 @@
import { MakeDecoratorResult } from "../index";
export const addReadme: MakeDecoratorResult;

View File

@ -3,6 +3,7 @@ import { storiesOf, addDecorator } from "@storybook/react";
import { withDocs, withReadme, doc, addReadme, configureReadme, addFooter, addHeader } from "storybook-readme";
import Marked from "storybook-readme/components/Marked";
import registerWithPanelTitle from "storybook-readme/registerWithPanelTitle";
import { addReadme as addHtmlReadme } from "storybook-readme/html";
// Possibly any .md files or strings
const DocExample1 = `
@ -20,6 +21,7 @@ A very simple component with markdown
// Tests for v5
registerWithPanelTitle("Custom Name Here");
addDecorator(addReadme);
addDecorator(addHtmlReadme);
storiesOf('addParameter Example', module)
.addParameters({
readme: {

View File

@ -20,6 +20,7 @@
"index.d.ts",
"components/Marked.d.ts",
"registerWithPanelTitle/index.d.ts",
"html/index.d.ts",
"storybook-readme-tests.tsx"
]
}