forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.stories.tsx
More file actions
28 lines (26 loc) · 830 Bytes
/
index.stories.tsx
File metadata and controls
28 lines (26 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import React from 'react';
import { storiesOf } from '@storybook/react';
import { object } from '@storybook/addon-knobs';
import CustomTemplate from '.';
import { sandbox } from '../SandboxCard/fixtures';
const template = (props = null) => ({
id: '2321',
color: '#fff',
sandbox: sandbox(props),
});
const stories = storiesOf('components/CustomTemplate', module);
stories
.add('Default', () => (
<CustomTemplate template={object('template', template())} />
))
.add('No Title', () => (
<CustomTemplate template={object('template', template({ title: null }))} />
))
.add('No Description', () => (
<CustomTemplate
template={object('template', template({ description: null }))}
/>
))
.add('No Tags', () => (
<CustomTemplate template={object('template', template({ tags: [] }))} />
));