This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"storybook": "start-storybook", | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
html: '<h1>This is my component</h1><my-component></my-component>', | |
jsCode: "import './my-component.js';" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const stories = [{ key: 'demo', story: demo, code: demo }]; | |
for (const story of stories) { | |
const storyEl = rootNode.querySelector(`[mdjs-story-name="${story.key}"]`); | |
storyEl.story = story.story; | |
storyEl.code = story.code; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
title: 'My Group/My Awesome Component', | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"start": "es-dev-server", | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Chart } from '../components/chart' | |
# Here’s a chart | |
The chart is rendered inside our MDX document. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
stories: ['../README.md', '../docs/**/*.md'], | |
esDevServer: { | |
nodeResolve: true, | |
watch: true, | |
open: true, | |
}, | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<demo-1 /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { mdjsTransformer } = require('@mdjs/core'); | |
module.exports = { | |
nodeResolve: true, | |
open: 'README.md', | |
watch: true, | |
responseTransformers: [mdjsTransformer], | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
html: '<h1>This is my component</h1><my-component></my-component>', | |
jsCode: "import './my-component.js';", | |
stories: [ | |
key: 'demo', | |
name: 'demo', | |
code: 'export const demo = () => `<my-component header="from attribute"></my-component>`', | |
] | |
} |
NewerOlder