Skip to content

Commit 1e6f6ae

Browse files
committed
add more components
1 parent e2b0221 commit 1e6f6ae

File tree

2 files changed

+122
-0
lines changed

2 files changed

+122
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from 'react';
2+
import { storiesOf } from '@storybook/react';
3+
4+
import { UserWithAvatar } from './index.tsx';
5+
6+
const user = {
7+
view_count: 26337,
8+
username: 'SaraVieira',
9+
twitter: 'NikkitaFTW',
10+
subscription_since: '2018-03-01T16:00:18.032858Z',
11+
showcased_sandbox_shortid: 'jp64y1jl15',
12+
name: 'Sara Vieira',
13+
inserted_at: '2017-07-18T23:49:53.950233',
14+
id: '8d35d7c1-eecb-4aad-87b0-c22d30d12081',
15+
curator_at: '2018-11-25T18:51:34.542902Z',
16+
bio: 'I am sara',
17+
avatarUrl: 'https://avatars0.githubusercontent.com/u/1051509?v=4',
18+
};
19+
storiesOf('User', module).add('Default', () => <UserWithAvatar {...user} />);
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
import React from 'react';
2+
import { object } from '@storybook/addon-knobs';
3+
import { storiesOf } from '@storybook/react';
4+
5+
import WideSandbox from './index.tsx';
6+
7+
const Sandbox = {
8+
id: 'jp64y1jl15',
9+
view_count: 385,
10+
version: 5,
11+
user_liked: false,
12+
updated_at: '2019-02-28T19:58:25.869808',
13+
title: 'LOOOL',
14+
template: 'static',
15+
team: null,
16+
tags: [],
17+
source_id: '4baffb72-2355-42d1-a1f3-0c835dc5af5d',
18+
screenshot_url: 'https://screenshots.codesandbox.io/jp64y1jl15.png',
19+
room_id: null,
20+
privacy: 0,
21+
picks: [],
22+
owned: false,
23+
original_git_commit_sha: '319fd59bb6e454810d7b609bc108f88cd88cf654',
24+
original_git: {
25+
username: 'codesandbox-app',
26+
repo: 'static-template',
27+
path: '',
28+
commit_sha: '319fd59bb6e454810d7b609bc108f88cd88cf654',
29+
branch: 'master',
30+
},
31+
npm_dependencies: {},
32+
modules: [
33+
{
34+
updated_at: '2019-02-28T19:58:25.905520',
35+
title: 'package.json',
36+
source_id: '4baffb72-2355-42d1-a1f3-0c835dc5af5d',
37+
shortid: 'H1gwPDrw2X',
38+
is_binary: false,
39+
inserted_at: '2019-02-07T12:26:05.570784',
40+
id: 'de57f27e-7c0b-45db-b1bd-441ffd5af72c',
41+
directory_shortid: null,
42+
code:
43+
'{\n "name": "loool",\n "version": "1.0.0",\n "description": "LOOOK ATR ME MOM",\n "main": "index.html",\n "scripts": {\n "test": "echo \\"Error: no test specified\\" && exit 1"\n },\n "repository": {\n "type": "git",\n "url": "git+https://github.com/codesandbox-app/static-template.git"\n },\n "keywords": [],\n "author": "Ives van Hoorne",\n "license": "MIT",\n "bugs": {\n "url": "https://github.com/codesandbox-app/static-template/issues"\n },\n "homepage": "https://github.com/codesandbox-app/static-template#readme"\n}',
44+
},
45+
{
46+
updated_at: '2019-02-07T12:26:07.153183',
47+
title: 'index.html',
48+
source_id: '4baffb72-2355-42d1-a1f3-0c835dc5af5d',
49+
shortid: 'B1wvPBw37',
50+
is_binary: false,
51+
inserted_at: '2019-02-07T12:26:05.573708',
52+
id: '71cfc161-436f-41a9-89a3-e511781f84fa',
53+
directory_shortid: null,
54+
code:
55+
'<!DOCTYPE html>\n<html lang="en">\n\n<head>\n\t<meta charset="UTF-8">\n\t<meta name="viewport" content="width=device-width, initial-scale=1.0">\n\t<meta http-equiv="X-UA-Compatible" content="ie=edge">\n\t<title>Static Template</title>\n</head>\n\n<body>\n\t<h1>This is a static template, there is no bundler or bundling involved!</h1>\n</body>\n\n</html>',
56+
},
57+
{
58+
updated_at: '2019-02-07T12:26:05.563147',
59+
title: 'sandbox.config.json',
60+
source_id: '4baffb72-2355-42d1-a1f3-0c835dc5af5d',
61+
shortid: 'HkbPvvHDnX',
62+
is_binary: false,
63+
inserted_at: '2019-02-07T12:26:05.563128',
64+
id: '8cc9c3e0-cbe1-45be-8695-d9aa72c76e01',
65+
directory_shortid: null,
66+
code: '{\n "template": "static"\n}\n',
67+
},
68+
],
69+
like_count: 0,
70+
is_sse: false,
71+
is_frozen: false,
72+
git: null,
73+
fork_count: 0,
74+
external_resources: [],
75+
entry: 'index.html',
76+
directories: [],
77+
description: 'LOOOK ATR ME MOM',
78+
collection: false,
79+
author: {
80+
view_count: 26337,
81+
username: 'SaraVieira',
82+
twitter: 'NikkitaFTW',
83+
subscription_since: '2018-03-01T16:00:18.032858Z',
84+
showcased_sandbox_shortid: 'jp64y1jl15',
85+
sandbox_count: 329,
86+
received_like_count: 57,
87+
profile_email: '[email protected]',
88+
name: 'Sara Vieira',
89+
inserted_at: '2017-07-18T23:49:53.950233',
90+
id: '8d35d7c1-eecb-4aad-87b0-c22d30d12081',
91+
given_like_count: 29,
92+
forked_count: 981,
93+
featured_sandboxes: [],
94+
curator_at: '2018-11-25T18:51:34.542902Z',
95+
bio: 'I am sara',
96+
badges: [{ visible: true, name: 'Patron II', id: 'patron_2' }],
97+
avatar_url: 'https://avatars0.githubusercontent.com/u/1051509?v=4',
98+
},
99+
};
100+
101+
storiesOf('WideSandbox', module).add('Default', () => (
102+
<WideSandbox sandbox={object('Sandbox', Sandbox)} settings={{}} />
103+
));

0 commit comments

Comments
 (0)