Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added link for LICENSE.md (#2138) * Docs: Add "Setting up your editor" (#2130) Follow up on #2073 Adds a new docs page about setting up your editor. This page specifically documents creating a `jsconfig.json` to improve the editing experinace with VS Code * Nest global styles in styles directory * Scaffold styles constant * Referenced styles constant in components
- Loading branch information
Showing
21 changed files
with
140 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import styled from 'styled-components'; | ||
import { color } from 'styles'; | ||
|
||
const Wrapper = styled.footer` | ||
display: flex; | ||
justify-content: space-between; | ||
padding: 3em 0; | ||
border-top: 1px solid #666; | ||
border-top: 1px solid ${color.gray_2}; | ||
`; | ||
|
||
export default Wrapper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
import { Link } from 'react-router-dom'; | ||
import styled from 'styled-components'; | ||
import { color, font, size } from 'styles'; | ||
|
||
export default styled(Link)` | ||
display: inline-flex; | ||
padding: 0.25em 2em; | ||
margin: 1em; | ||
text-decoration: none; | ||
border-radius: 4px; | ||
border-radius: ${size.border_radius}; | ||
-webkit-font-smoothing: antialiased; | ||
-webkit-touch-callout: none; | ||
user-select: none; | ||
cursor: pointer; | ||
outline: 0; | ||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | ||
font-family: ${font.sans}; | ||
font-weight: bold; | ||
font-size: 16px; | ||
border: 2px solid #41addd; | ||
color: #41addd; | ||
border: 2px solid ${color.primary}; | ||
color: ${color.primary}; | ||
&:active { | ||
background: #41addd; | ||
background: ${color.primary}; | ||
color: #fff; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import styled from 'styled-components'; | ||
import { color } from 'styles'; | ||
|
||
const Input = styled.input` | ||
outline: none; | ||
border-bottom: 1px dotted #999; | ||
border-bottom: 1px dotted ${color.gray_1}; | ||
`; | ||
|
||
export default Input; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
export const breakpoint = { | ||
small: '40em', | ||
medium: '64em', | ||
large: '75em', | ||
}; | ||
|
||
export const color = { | ||
primary: '#41addd', | ||
primary_light: '#6cc0e5', | ||
black: '#101010', | ||
white: '#fafafa', | ||
off_white: '#eee', | ||
gray_1: '#999', | ||
gray_2: '#666', | ||
|
||
}; | ||
|
||
export const font = { | ||
serif: "Georgia, Times, 'Times New Roman', serif", | ||
sans: "'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif", | ||
sans_preload: "'Helvetica Neue', Helvetica, Arial, sans-serif", | ||
}; | ||
|
||
export const size = { | ||
border_radius: '4px', | ||
}; | ||
|
||
export default { | ||
breakpoint, | ||
color, | ||
font, | ||
size, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Setting Up Your Editor | ||
|
||
You can edit React Boilerplate using any editor or IDE, but there are a few extra steps that you can take to make sure your coding experience is as good as it can be. | ||
|
||
## VS Code | ||
To get the best editing experience with [VS Code](https://code.visualstudio.com), create a [`jsconfig.json`](https://code.visualstudio.com/Docs/languages/javascript#_javascript-project-jsconfigjson) file at the root of your project: | ||
|
||
```json | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": "app", | ||
"module": "commonjs", | ||
"target": "es2016", | ||
"jsx": "react" | ||
}, | ||
"exclude": [ | ||
"node_modules", | ||
"**/node_modules/*" | ||
] | ||
} | ||
``` | ||
|
||
This `jsconfig.json` file tells VS Code to treat all JS file as part of the same project, improving IntelliSense, code navigation, and refactoring. You can configure project wide settings in using the `jsconfig.json`, such as only allowing functions from the ES5 standard library, or even enable [more advanced type checking for JS files](https://code.visualstudio.com/docs/languages/javascript#_type-checking-and-quick-fixes-for-javascript-files) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
export const breakpoint = { | ||
small: '40em', | ||
medium: '64em', | ||
large: '75em', | ||
}; | ||
|
||
export const color = { | ||
primary: '#41addd', | ||
primary_light: '#6cc0e5', | ||
black: '#101010', | ||
white: '#fafafa', | ||
off_white: '#eee', | ||
gray_1: '#999', | ||
gray_2: '#666', | ||
|
||
}; | ||
|
||
export const font = { | ||
serif: "Georgia, Times, 'Times New Roman', serif", | ||
sans: "'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif", | ||
sans_preload: "'Helvetica Neue', Helvetica, Arial, sans-serif", | ||
}; | ||
|
||
export const size = { | ||
border_radius: '4px', | ||
}; | ||
|
||
export default { | ||
breakpoint, | ||
color, | ||
font, | ||
size, | ||
}; |
Oops, something went wrong.