mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[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:
parent
ed9f3a7454
commit
3b625a5f37
3
types/storybook-readme/html/index.d.ts
vendored
Normal file
3
types/storybook-readme/html/index.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import { MakeDecoratorResult } from "../index";
|
||||
|
||||
export const addReadme: MakeDecoratorResult;
|
||||
@ -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: {
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
"index.d.ts",
|
||||
"components/Marked.d.ts",
|
||||
"registerWithPanelTitle/index.d.ts",
|
||||
"html/index.d.ts",
|
||||
"storybook-readme-tests.tsx"
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user