Skip to content
This repository was archived by the owner on Jan 5, 2022. It is now read-only.

Commit 855e27a

Browse files
committed
Upgrade Dennis, set version
1 parent 6d6cb17 commit 855e27a

File tree

15 files changed

+19639
-19739
lines changed

15 files changed

+19639
-19739
lines changed

app/components/Accordion.js

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
1-
import React, { Component } from "react";
2-
import styled from 'styled-components';
3-
import PropTypes from "prop-types";
4-
5-
import AccordionSection from "./AccordionSection";
6-
7-
class Accordion extends Component {
8-
static propTypes = {
9-
allowMultipleOpen: PropTypes.bool,
10-
children: PropTypes.instanceOf(Object).isRequired,
11-
};
12-
13-
static defaultProps = {
14-
allowMultipleOpen: false,
15-
};
16-
17-
constructor(props) {
18-
super(props);
19-
20-
const openSections = {};
21-
22-
this.props.children.forEach(child => {
23-
if (child.props.isOpen) {
24-
openSections[child.props.label] = true;
25-
}
26-
});
27-
28-
this.state = { openSections };
29-
}
30-
31-
onClick = label => {
32-
const { props: { allowMultipleOpen }, state: { openSections } } = this;
33-
34-
const isOpen = !!openSections[label];
35-
36-
if (allowMultipleOpen) {
37-
this.setState({
38-
openSections: {
39-
...openSections,
40-
[label]: !isOpen
41-
}
42-
});
43-
} else {
44-
this.setState({
45-
openSections: {
46-
[label]: !isOpen
47-
}
48-
});
49-
}
50-
};
51-
52-
render() {
53-
const {
54-
onClick,
55-
props: { children },
56-
state: { openSections },
57-
} = this;
58-
59-
return (
60-
<div>
61-
{children.map(child => (
62-
<AccordionSection
63-
isOpen={!!openSections[child.props.label]}
64-
label={child.props.label}
65-
onClick={onClick}
66-
>
67-
{child.props.children}
68-
</AccordionSection>
69-
))}
70-
</div>
71-
);
72-
}
73-
}
74-
1+
import React, { Component } from "react";
2+
import styled from 'styled-components';
3+
import PropTypes from "prop-types";
4+
5+
import AccordionSection from "./AccordionSection";
6+
7+
class Accordion extends Component {
8+
static propTypes = {
9+
allowMultipleOpen: PropTypes.bool,
10+
children: PropTypes.instanceOf(Object).isRequired,
11+
};
12+
13+
static defaultProps = {
14+
allowMultipleOpen: false,
15+
};
16+
17+
constructor(props) {
18+
super(props);
19+
20+
const openSections = {};
21+
22+
this.props.children.forEach(child => {
23+
if (child.props.isOpen) {
24+
openSections[child.props.label] = true;
25+
}
26+
});
27+
28+
this.state = { openSections };
29+
}
30+
31+
onClick = label => {
32+
const { props: { allowMultipleOpen }, state: { openSections } } = this;
33+
34+
const isOpen = !!openSections[label];
35+
36+
if (allowMultipleOpen) {
37+
this.setState({
38+
openSections: {
39+
...openSections,
40+
[label]: !isOpen
41+
}
42+
});
43+
} else {
44+
this.setState({
45+
openSections: {
46+
[label]: !isOpen
47+
}
48+
});
49+
}
50+
};
51+
52+
render() {
53+
const {
54+
onClick,
55+
props: { children },
56+
state: { openSections },
57+
} = this;
58+
59+
return (
60+
<div>
61+
{children.map(child => (
62+
<AccordionSection
63+
isOpen={!!openSections[child.props.label]}
64+
label={child.props.label}
65+
onClick={onClick}
66+
>
67+
{child.props.children}
68+
</AccordionSection>
69+
))}
70+
</div>
71+
);
72+
}
73+
}
74+
7575
export default Accordion;

app/components/AccordionSection.js

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
1-
import React, { Component } from "react";
2-
import styled from 'styled-components';
3-
import PropTypes from "prop-types";
4-
5-
const Row = styled.div`
6-
overflow: hidden;
7-
padding: 0px 0px 15px 10px;
8-
margin: 0;
9-
box-sizing: border-box;
10-
text-transform: uppercase;
11-
color: ${props => props.theme.colors.transactionsDate};
12-
font-size: ${props => `${props.theme.fontSize.regular * 1}em`};
13-
font-weight: ${props => String(props.theme.fontWeight.bold)};
14-
font-family: ${props => props.theme.fontFamily};
15-
overflow: hidden;
16-
background-color: ${props => props.theme.colors.AccordionBg};
17-
`;
18-
19-
20-
class AccordionSection extends Component {
21-
static propTypes = {
22-
children: PropTypes.instanceOf(Object).isRequired,
23-
isOpen: PropTypes.bool.isRequired,
24-
label: PropTypes.string.isRequired,
25-
onClick: PropTypes.func.isRequired
26-
};
27-
28-
onClick = () => {
29-
this.props.onClick(this.props.label);
30-
};
31-
32-
33-
render() {
34-
const { onClick, props: { isOpen, label } } = this;
35-
36-
return (
37-
<div
38-
>
39-
<Row class={label} onClick={onClick} style={{ cursor: "pointer" }}>
40-
{label}
41-
</Row>
42-
{isOpen && (
43-
<div
44-
>
45-
{this.props.children}
46-
</div>
47-
)}
48-
</div>
49-
);
50-
}
51-
}
52-
53-
export default AccordionSection;
1+
import React, { Component } from "react";
2+
import styled from 'styled-components';
3+
import PropTypes from "prop-types";
4+
5+
const Row = styled.div`
6+
overflow: hidden;
7+
padding: 0px 0px 15px 10px;
8+
margin: 0;
9+
box-sizing: border-box;
10+
text-transform: uppercase;
11+
color: ${props => props.theme.colors.transactionsDate};
12+
font-size: ${props => `${props.theme.fontSize.regular * 1}em`};
13+
font-weight: ${props => String(props.theme.fontWeight.bold)};
14+
font-family: ${props => props.theme.fontFamily};
15+
overflow: hidden;
16+
background-color: ${props => props.theme.colors.AccordionBg};
17+
`;
18+
19+
20+
class AccordionSection extends Component {
21+
static propTypes = {
22+
children: PropTypes.instanceOf(Object).isRequired,
23+
isOpen: PropTypes.bool.isRequired,
24+
label: PropTypes.string.isRequired,
25+
onClick: PropTypes.func.isRequired
26+
};
27+
28+
onClick = () => {
29+
this.props.onClick(this.props.label);
30+
};
31+
32+
33+
render() {
34+
const { onClick, props: { isOpen, label } } = this;
35+
36+
return (
37+
<div
38+
>
39+
<Row class={label} onClick={onClick} style={{ cursor: "pointer" }}>
40+
{label}
41+
</Row>
42+
{isOpen && (
43+
<div
44+
>
45+
{this.props.children}
46+
</div>
47+
)}
48+
</div>
49+
);
50+
}
51+
}
52+
53+
export default AccordionSection;

app/components/loading-jokes.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
2-
export const jokes = [
3-
'We’ll we’ll we’ll…if it isn’t autocorrect.',
4-
"Why aren't iPhone chargers called Apple Juice?!",
5-
'Don’t use “beef stew” as a computer password. It’s not stroganoff.',
6-
'In a world without fences and walls, who needs Gates and Windows?',
7-
'CAPS LOCK – Preventing Login Since 1980.',
8-
'How does a computer get drunk? It takes screenshots.',
9-
'Why do they call it hyper text? Too much JAVA.',
10-
"There is a band called 1023MB. They haven't had any gigs yet.",
11-
'Why did the developer go broke? Because he used up all his cache',
12-
'Why do Java developers wear glasses? Because they cannot C#',
13-
'How many programmers does it take to change a light bulb? None. Its a hardware problem.',
14-
'There are three kinds of people: those who can count and those who can’t.',
15-
'Latest survey shows that 3 out of 4 people make up 75% of the world’s population.',
16-
'1f u c4n r34d th1s u r34lly n33d t0 g37 l41d.',
17-
'The box said ‘Requires Windows Vista or better’. So I installed LINUX.',
18-
'The truth is out there. Anybody got the URL?',
19-
'Error reading FAT record: Try the SKINNY one? (Y/N)',
20-
'C program run. C program crash. C programmer quit.',
21-
'Where did the hacker go for the long weekend? Phishing.',
22-
'There are 10 types of people in the world: those who understand binary, and those who don’t.',
23-
'2 hashes walk into a bar, one was a salted.',
24-
'If holding your VDL is V-staking.... is mining it V-stalking?',
25-
'An SEO expert walks into a bar, bars, lounge, night club, tavern, pub, beer, vodka, wine, whiskey…',
26-
];
1+
2+
export const jokes = [
3+
'We’ll we’ll we’ll…if it isn’t autocorrect.',
4+
"Why aren't iPhone chargers called Apple Juice?!",
5+
'Don’t use “beef stew” as a computer password. It’s not stroganoff.',
6+
'In a world without fences and walls, who needs Gates and Windows?',
7+
'CAPS LOCK – Preventing Login Since 1980.',
8+
'How does a computer get drunk? It takes screenshots.',
9+
'Why do they call it hyper text? Too much JAVA.',
10+
"There is a band called 1023MB. They haven't had any gigs yet.",
11+
'Why did the developer go broke? Because he used up all his cache',
12+
'Why do Java developers wear glasses? Because they cannot C#',
13+
'How many programmers does it take to change a light bulb? None. Its a hardware problem.',
14+
'There are three kinds of people: those who can count and those who can’t.',
15+
'Latest survey shows that 3 out of 4 people make up 75% of the world’s population.',
16+
'1f u c4n r34d th1s u r34lly n33d t0 g37 l41d.',
17+
'The box said ‘Requires Windows Vista or better’. So I installed LINUX.',
18+
'The truth is out there. Anybody got the URL?',
19+
'Error reading FAT record: Try the SKINNY one? (Y/N)',
20+
'C program run. C program crash. C programmer quit.',
21+
'Where did the hacker go for the long weekend? Phishing.',
22+
'There are 10 types of people in the world: those who understand binary, and those who don’t.',
23+
'2 hashes walk into a bar, one was a salted.',
24+
'If holding your VDL is V-staking.... is mining it V-stalking?',
25+
'An SEO expert walks into a bar, bars, lounge, night club, tavern, pub, beer, vodka, wine, whiskey…',
26+
];

0 commit comments

Comments
 (0)