Skip to content

Commit fdc5d8a

Browse files
committed
added better config and more examples for emotion
1 parent da20871 commit fdc5d8a

File tree

6 files changed

+29
-10
lines changed

6 files changed

+29
-10
lines changed

.eslintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"__DEV__": true
1313
},
1414
"rules": {
15+
"emotion/jsx-import": "error",
1516
"no-var": 2, // http://eslint.org/docs/rules/no-var
1617
"prefer-const": 2, // http://eslint.org/docs/rules/prefer-const
1718

@@ -170,6 +171,7 @@
170171
"react/jsx-wrap-multilines": 2
171172
},
172173
"plugins": [
173-
"react"
174+
"react",
175+
"emotion"
174176
]
175177
}

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"css-loader": "^0.28.7",
1111
"eslint": "^4.13.1",
1212
"eslint-loader": "^1.9.0",
13+
"eslint-plugin-emotion": "^10.0.7",
1314
"eslint-plugin-react": "^7.4.0",
1415
"gh-pages": "^1.1.0",
1516
"node-sass": "^4.11.0",
-1.21 KB
Loading

src/components/join/form.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,35 @@
1+
/** @jsx jsx */
12
import React from 'react';
2-
import Link from 'Lib/buttons/Link';
3+
import StyledLink from 'Lib/buttons/Link';
34
import blueBg from 'Images/blue-bg.jpg';
45
import femaleOctocat from 'Images/femalecodertocat.png';
56
import { BACKEND_URL } from 'Constants';
7+
import { jsx } from '@emotion/core';
8+
import { Link } from 'react-router-dom';
69

710
class JoinForm extends React.Component {
811
render() {
912
return (
10-
<section id="hero" className="dark-bg img-bg img-bg-soft" style={{ backgroundImage: `url(${blueBg})` }}>
13+
<section css={{ backgroundImage: `url(${blueBg})` }}>
1114
<div className="container inner-top-md inner-bottom-sm">
1215
<div className="row">
1316
<div className="col-md-5 inner-right inner-bottom-xs">
1417
<header>
15-
<h1>Signup</h1>
16-
<p>Use github to create or access your account.</p>
18+
<h1>Join</h1>
19+
<p>You'll use your email to log in, your username is used when displaying submissions and comments.</p>
1720
<p>
18-
<Link to={`${BACKEND_URL}/api/auth/github`} target="_self" css={{ fontSize: '18px', padding: '15px 35px 17px', marginTop: '35px' }}>
19-
<i className="icon-github" />
20-
Github Signup
21+
<StyledLink to={`${BACKEND_URL}/api/auth/github`} css={{ fontSize: '18px', padding: '15px 35px 17px', marginTop: '35px' }}>
22+
Submit
23+
</StyledLink>
24+
</p>
25+
<p> Have an account?
26+
<Link to={`${BACKEND_URL}/api/auth/github`}>
27+
Log in
28+
</Link>
29+
</p>
30+
<p>
31+
<Link to={`${BACKEND_URL}/api/auth/github`}>
32+
Forgot Password?
2133
</Link>
2234
</p>
2335
</header>

src/lib/buttons/Link.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import styled from '@emotion/styled';
2-
// import React from 'react';
3-
// import PropTypes from 'prop-types';
42
import { Link } from 'react-router-dom';
53

64
const StyledLink = styled(Link)(

0 commit comments

Comments
 (0)