using markdown in addon-notes do not work
See original GitHub issueDescribe the bug using markdown in addon-notes do not work
To Reproduce Steps to reproduce the behavior:
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
Expected behavior show notes panel in the markdown way
Screenshots
Code snippets config.js file:
import { configure, addDecorator } from '@storybook/react';
import { configureViewport } from '@storybook/addon-viewport';
import { withOptions } from '@storybook/addon-options';
import { withNotes } from '@storybook/addon-notes';
// automatically import all files ending in *.stories.tsx
const req = require.context('../stories', true, /.stories.(tsx|ts)$/);
function loadStories() {
req.keys().forEach(req);
}
configureViewport({
defaultViewport: 'iphone6'
});
// override option defaults:
addDecorator(withOptions({
name: '',
// url: 'https://github.com/vanilla-framework/vanilla-framework-react',
addonPanelInRight: true,
}))
addDecorator(withNotes)
configure(loadStories, module);
index.stories.tsx file:
import * as React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { Input } from '../src';
storiesOf('Button', module)
// .addDecorator(withNotes('1'))
.add('with text', () => {
return <Input />
},{
notes:{
markdown:`
###
1
###
2
`
}
})
.add('with some emoji', () => (
<div onClick={action('button-click')}>click me,please!</div>
),{
notes:'2'
});
System:
- OS: [e.g. iOS, Windows10, MacOS]
- Device: [e.g. iPhoneX, Macbook Pro 2018]
- Browser: [e.g. chrome, safari]
- Framework: [e.g. react, vue, angular]
- Addons: [if relevant]
- Version: [e.g. 4.0.0]
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:12
Top Results From Across the Web
using markdown in addon-notes do not work #5217 - GitHub
Describe the bug using markdown in addon-notes do not work To Reproduce Steps to reproduce the behavior: Go to '...' Click on '....
Read more >Writing storybook inlined with markdown - Tomasz Pluskiewicz
There are addons but they are not presentable enough (addon-notes) or do not support all targets (addon-info). Here I present a different approach,...
Read more >Markdown Support | PyCharm Documentation - JetBrains
The preview does not work on Android Studio. This is a known issue and there is a workaround: use JetBrains Runtime instead of...
Read more >Storybook Addon Notes
Storybook Addon Notes allows you to write notes (text or HTML) for your ... Using Markdown in your notes is supported, Storybook will...
Read more >storybook-addon-uxs - NPM Package Overview - Socket - Socket.dev
Using Markdown in your notes is supported, Storybook will load Markdown as raw by default. import { storiesOf } from '@storybook/react'; import ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1 I would like to be able to use markdown in-line (without having to import or use const). Thank you.I just worked it out. Try like:
Note it’s required that there is no indentation of the markdown contents otherwise it doesn’t work…
I am having the same issue (kinda). It seems like it is rendering the markdown but the formatting for the table in my markdown.
preview from my editor:
what is showing in storybook: