/
main.js
61 lines (58 loc) · 1.96 KB
/
main.js
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* eslint-disable react/prop-types */
import * as React from 'react';
import { render, Text, View } from 'react-sketchapp';
import { fonts, spacing } from './designSystem';
import Profile from './components/Profile';
import Space from './components/Space';
const Page = ({ users }) => (
<View>
<Text style={fonts['Title 1']}>Profile Cards</Text>
<View
style={{
flexDirection: 'row',
flexWrap: 'wrap',
width: users.length * 300,
}}
>
{users.map(user => (
<Space key={user.screen_name} h={spacing} v={spacing}>
<Profile user={user} />
</Space>
))}
</View>
</View>
);
export default () => {
const DATA = [
{
screen_name: 'mxstbr',
name: 'Max Stoiber',
description:
'⚛️ Makes styled-components, react-boilerplate, @KeystoneJS and CarteBlanche. ✌ Open source developer @thethinkmill. ☕ Speciality coffee geek, skier, traveller.',
location: 'Vienna, Austria',
url: 'mxstbr.com',
profile_image_url:
'https://pbs.twimg.com/profile_images/763033229993574400/6frGyDyA_400x400.jpg',
},
{
name: '- ̗̀Jackie ̖́-',
screen_name: 'jackiesaik',
description:
'Graphic designer, never won a spelling be. Toronto on weekdays. Go Home Lake on weekends. ╮ (. ● ᴗ ●.) ╭',
location: 'Toronto, ON',
url: 'cargocollective.com/jackiesaik',
profile_image_url:
'https://pbs.twimg.com/profile_images/895665264464764930/7Mb3QtEB_400x400.jpg',
},
{
screen_name: 'jongold',
name: 'kerning man',
description:
'an equal command of technology and form • functional programming (oc)cultist • design tools @airbnbdesign',
location: 'California',
url: 'weirdwideweb.jon.gold',
profile_image_url: 'https://pbs.twimg.com/profile_images/833785170285178881/loBb32g3.jpg',
},
];
render(<Page users={DATA} />, context.document.currentPage());
};