Skip to content

Commit 9bc9305

Browse files
author
Ives van Hoorne
committed
Prettier 1.0
1 parent 76f4d5b commit 9bc9305

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+696
-590
lines changed

src/app/components/Portal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ReactDOM from 'react-dom';
44

55
type Props = {
66
children: React.Element<*>,
7-
}
7+
};
88

99
export default class Portal extends React.Component {
1010
props: Props;

src/app/components/ReactIcon.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,32 @@ export default () => (
66
<g>
77
<circle fill="currentColor" cx="299.529" cy="299.628" r="50.167" />
88
<path
9-
fill="none" stroke="currentColor" strokeWidth="20" strokeMiterlimit="10" d="M299.529,197.628
9+
fill="none"
10+
stroke="currentColor"
11+
strokeWidth="20"
12+
strokeMiterlimit="10"
13+
d="M299.529,197.628
1014
c67.356,0,129.928,9.665,177.107,25.907c56.844,19.569,91.794,49.233,91.794,76.093c0,27.991-37.041,59.503-98.083,79.728
1115
c-46.151,15.291-106.879,23.272-170.818,23.272c-65.554,0-127.63-7.492-174.29-23.441c-59.046-20.182-94.611-52.103-94.611-79.559
1216
c0-26.642,33.37-56.076,89.415-75.616C167.398,207.503,231.515,197.628,299.529,197.628z"
1317
/>
1418
<path
15-
fill="none" stroke="currentColor" strokeWidth="20" strokeMiterlimit="10" d="M210.736,248.922
19+
fill="none"
20+
stroke="currentColor"
21+
strokeWidth="20"
22+
strokeMiterlimit="10"
23+
d="M210.736,248.922
1624
c33.649-58.348,73.281-107.724,110.92-140.48c45.35-39.466,88.507-54.923,111.775-41.505
1725
c24.248,13.983,33.042,61.814,20.067,124.796c-9.81,47.618-33.234,104.212-65.176,159.601
1826
c-32.749,56.788-70.25,106.819-107.377,139.272c-46.981,41.068-92.4,55.929-116.185,42.213
1927
c-23.079-13.31-31.906-56.921-20.834-115.233C153.281,368.316,176.758,307.841,210.736,248.922z"
2028
/>
2129
<path
22-
fill="none" stroke="currentColor" strokeWidth="20" strokeMiterlimit="10" d="M210.821,351.482
30+
fill="none"
31+
stroke="currentColor"
32+
strokeWidth="20"
33+
strokeMiterlimit="10"
34+
d="M210.821,351.482
2335
c-33.746-58.292-56.731-117.287-66.312-166.255c-11.544-58.999-3.382-104.109,19.864-117.566
2436
c24.224-14.024,70.055,2.244,118.14,44.94c36.356,32.28,73.688,80.837,105.723,136.173c32.844,56.733,57.461,114.209,67.036,162.582
2537
c12.117,61.213,2.309,107.984-21.453,121.74c-23.057,13.348-65.249-0.784-110.239-39.499

src/app/components/Switch.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ const Container = styled.div`
1111
transition: 0.3s ease all;
1212
position: relative;
1313
background-color: ${getColor};
14-
width: ${({ small }) => small ? 3 : 3.5}rem;
14+
width: ${({ small }) => (small ? 3 : 3.5)}rem;
1515
color: rgba(0,0,0,0.5);
1616
border: 1px solid rgba(0,0,0,.1);
1717
padding: 0.5rem;
18-
height: ${props => props.small ? 20 : 26}px;
18+
height: ${props => (props.small ? 20 : 26)}px;
1919
box-sizing: border-box;
2020
cursor: pointer;
2121
border-radius: 4px;
@@ -31,13 +31,12 @@ const Container = styled.div`
3131
const Dot = styled.div`
3232
transition: inherit;
3333
position: absolute;
34-
height: ${props => props.small ? 14 : 20}px;
34+
height: ${props => (props.small ? 14 : 20)}px;
3535
width: 1rem;
3636
left: 0.1rem;
3737
border-radius: 4px;
38-
transform: translateX(${props =>
39-
props.right ? props.small ? 'calc(1.5rem + 2px)' : 'calc(2rem + 2px)' : '0'});
40-
top: ${({ small }) => small ? `calc(0.1rem + 1px)` : `calc(0.1rem)`};
38+
transform: translateX(${props => (props.right ? props.small ? 'calc(1.5rem + 2px)' : 'calc(2rem + 2px)' : '0')});
39+
top: ${({ small }) => (small ? `calc(0.1rem + 1px)` : `calc(0.1rem)`)};
4140
background-color: white;
4241
box-shadow: 0 0 4px rgba(0,0,0,0.2);
4342
`;
@@ -50,9 +49,13 @@ type Props = {
5049
secondary: ?boolean,
5150
};
5251

53-
export default (
54-
{ right, onClick, secondary = false, offMode = false, small = false }: Props
55-
) => (
52+
export default ({
53+
right,
54+
onClick,
55+
secondary = false,
56+
offMode = false,
57+
small = false,
58+
}: Props) => (
5659
<Container
5760
small={small}
5861
secondary={secondary}

src/app/components/Tooltip.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,16 @@ type Props = {
125125
bottom: ?boolean,
126126
};
127127

128-
export default (
129-
{ className, offset = 0, children, message, left, right, bottom, top }: Props
130-
) => (
128+
export default ({
129+
className,
130+
offset = 0,
131+
children,
132+
message,
133+
left,
134+
right,
135+
bottom,
136+
top,
137+
}: Props) => (
131138
<Tooltip
132139
className={className}
133140
bottom={bottom}

src/app/components/buttons/Button.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ const getColor = ({ transparent, disabled, theme }) => {
2121
return 'white';
2222
};
2323

24-
const styles = props => `
24+
const styles = props =>
25+
`
2526
transition: 0.3s ease all;
2627
text-transform: uppercase;
2728
text-decoration: none;
@@ -32,14 +33,14 @@ const styles = props => `
3233
color: ${getColor(props)};
3334
border-radius: 2px;
3435
${(() => {
35-
if (props.small) {
36-
return `
36+
if (props.small) {
37+
return `
3738
padding: 0.5rem 0.75rem;
3839
font-size: 0.875rem;
3940
`;
40-
}
41-
return 'padding: 0.75rem 1rem;';
42-
})()}
41+
}
42+
return 'padding: 0.75rem 1rem;';
43+
})()}
4344
outline: none;
4445
width: ${props.block ? '100%' : 'inherit'};
4546

src/app/components/sandbox/ModeIcons.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const ViewIcon = styled.div`
3131
position: absolute;
3232
left: 0; right: 0; bottom: 0; top: 0;
3333
background-color: rgba(0,0,0,0.6);
34-
opacity: ${props => props.active ? 0 : 1};
34+
opacity: ${props => (props.active ? 0 : 1)};
3535
border-radius: 2px;
3636
overflow: hidden;
3737
}
@@ -63,15 +63,13 @@ type Props = {
6363
setMixedView: () => void,
6464
};
6565

66-
export default function AllIcons(
67-
{
68-
showEditor,
69-
showPreview,
70-
setEditorView,
71-
setMixedView,
72-
setPreviewView,
73-
}: Props
74-
) {
66+
export default function AllIcons({
67+
showEditor,
68+
showPreview,
69+
setEditorView,
70+
setMixedView,
71+
setPreviewView,
72+
}: Props) {
7573
return (
7674
<Tooltips>
7775
<Tooltip message="Editor view">

src/app/components/sandbox/Preview/Editor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ const Container = styled.div`
1717
font-size: 15px;
1818
}
1919
.cm-s-oceanic div.CodeMirror-selected {
20-
background: ${props => props.readOnly ? 'inherit' : 'rgba(255, 255, 255, 0.1)'};
20+
background: ${props => (props.readOnly ? 'inherit' : 'rgba(255, 255, 255, 0.1)')};
2121
}
2222
.cm-s-oceanic .CodeMirror-activeline-background {
23-
background: ${props => props.readOnly ? 'inherit' : 'rgba(255, 255, 255, 0.1)'};
23+
background: ${props => (props.readOnly ? 'inherit' : 'rgba(255, 255, 255, 0.1)')};
2424
}
2525
`;
2626

@@ -37,7 +37,7 @@ export default class Editor extends React.PureComponent {
3737
const { name, readOnly } = this.props;
3838
const doc = new CodeMirror.Doc(
3939
`ReactDOM.render(<${name || 'Component'} />, document.body);`,
40-
'jsx'
40+
'jsx',
4141
);
4242
this.codemirror = getCodeMirror(el, doc);
4343
this.codemirror.setOption('lineNumbers', false);

src/app/components/sandbox/Preview/Navigator.js

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ const Icons = styled.div`
2828

2929
const Icon = styled.div`
3030
display: inline-block;
31-
color: ${props =>
32-
props.disabled ? props.theme.gray : props.theme.gray.darken(0.3)};
31+
color: ${props => (props.disabled ? props.theme.gray : props.theme.gray.darken(0.3))};
3332
font-size: 1.5rem;
3433
line-height: 0.5;
3534
margin: 0 0.1rem;
@@ -64,18 +63,16 @@ type Props = {
6463
toggleProjectView: () => void,
6564
};
6665

67-
export default (
68-
{
69-
url,
70-
onChange,
71-
onConfirm,
72-
onBack,
73-
onForward,
74-
onRefresh,
75-
isProjectView,
76-
toggleProjectView,
77-
}: Props
78-
) => (
66+
export default ({
67+
url,
68+
onChange,
69+
onConfirm,
70+
onBack,
71+
onForward,
72+
onRefresh,
73+
isProjectView,
74+
toggleProjectView,
75+
}: Props) => (
7976
<Container>
8077
<Icons>
8178
<Icon disabled={!onBack} onClick={onBack}><LeftIcon /></Icon>

src/app/components/sandbox/Preview/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,7 @@ export default class Preview extends React.PureComponent {
277277
isInProjectView,
278278
setProjectView,
279279
} = this.props;
280-
const {
281-
historyPosition,
282-
history,
283-
urlInAddressBar,
284-
} = this.state;
280+
const { historyPosition, history, urlInAddressBar } = this.state;
285281

286282
const renderedModule = this.getRenderedModule();
287283

src/app/containers/ContextMenu.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@ const Item = styled.div`
4343
}
4444
4545
&:hover {
46-
color: ${props => props.color ? props.color : theme.secondary()};
46+
color: ${props => (props.color ? props.color : theme.secondary())};
4747
background-color: ${() => theme.background2.lighten(0.3)()};
48-
border-left-color: ${props =>
49-
props.color ? props.color : theme.secondary()};
48+
border-left-color: ${props => (props.color ? props.color : theme.secondary())};
5049
}
5150
`;
5251

0 commit comments

Comments
 (0)