storybook/examples/html-kitchen-sink/stories/source-loader.stories.js

27 lines
539 B
JavaScript
Raw Normal View History

2020-01-20 13:18:10 -05:00
import button from './button.html';
const packageName = './button.html';
const componentSubtitle = `import button from '${packageName}/lib/elements/buttons';`;
2020-01-20 13:18:10 -05:00
export default {
title: 'Addons/Source loader',
parameters: {
componentSubtitle,
},
2020-01-20 13:18:10 -05:00
};
export const Button = () => button;
Button.parameters = {
storySource: {
source: `source: ${button}`,
2020-01-20 13:18:10 -05:00
},
};
export const SimpleStory = () =>
`<p>
<strong>
This is a fragment of HTML
</strong>
</p>`;
SimpleStory.storyName = 'Very simple story';