Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { tag, mount, asCompiledCode } from '@storybook/riot';
import SimpleTestRaw from './SimpleTest.txt';
import './AnotherTest.tag';
const simpleTestCompiled = asCompiledCode(SimpleTestRaw);
export default {
title: 'Story/Nest tags',
};
export const threeTags = () => ({
tags: [
'Simple titleSimple Content',
'<h1></h1>',
'<div style="border-radius: 1em;border-right: solid 1px #cac9c9;border-bottom: solid 1px #cac9c9;box-shadow: 1em 1em 2em #eae9e9; margin: 3em; padding: 3em;min-height: 10em;min-width: 30em"></div>',
],
});
threeTags.story = {
name: 'Three tags',
};
import { tag, mount, storiesOf, asCompiledCode } from '@storybook/riot';
import SimpleTestRaw from './SimpleTest.txt';
import './AnotherTest.tag';
const simpleTestCompiled = asCompiledCode(SimpleTestRaw);
storiesOf('Story|How to create a story', module)
.add(
'built with tag',
() =>
tag('test', '<div>simple test ({ opts.value })</div>', '', '', () => {}) &&
mount('test', { value: 'with a parameter' })
)
.add('built as string', () => ({ tags: ['<div>simple test</div>'] }))
.add('built from raw import', () => simpleTestCompiled)
.add(
'built from tags and template',
() => ({