-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mrmrs
committed
May 5, 2019
1 parent
02b2ce1
commit 463273d
Showing
91 changed files
with
3,061 additions
and
100 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | ||
|
||
## Available Scripts | ||
|
||
In the project directory, you can run: | ||
|
||
### `npm start` | ||
|
||
Runs the app in the development mode.<br> | ||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. | ||
|
||
The page will reload if you make edits.<br> | ||
You will also see any lint errors in the console. | ||
|
||
### `npm test` | ||
|
||
Launches the test runner in the interactive watch mode.<br> | ||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
|
||
### `npm run build` | ||
|
||
Builds the app for production to the `build` folder.<br> | ||
It correctly bundles React in production mode and optimizes the build for the best performance. | ||
|
||
The build is minified and the filenames include the hashes.<br> | ||
Your app is ready to be deployed! | ||
|
||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
|
||
### `npm run eject` | ||
|
||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!** | ||
|
||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. | ||
|
||
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. | ||
|
||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. | ||
|
||
## Learn More | ||
|
||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). | ||
|
||
To learn React, check out the [React documentation](https://reactjs.org/). | ||
|
||
### Code Splitting | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting | ||
|
||
### Analyzing the Bundle Size | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size | ||
|
||
### Making a Progressive Web App | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app | ||
|
||
### Advanced Configuration | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration | ||
|
||
### Deployment | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment | ||
|
||
### `npm run build` fails to minify | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify |
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,68 +1,33 @@ | ||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | ||
# Tachyons React App [WIP] | ||
|
||
## Available Scripts | ||
This extends create-react-app to include Tachyons implemented with emotion + | ||
styled-system. If you're familiar with Tachyons and are interested in | ||
css-in-js, this is hopefully a helpful project. Can be used for anything you'd | ||
use create-react-app for. While Tachyons is light-weight by default, using css-in-js can | ||
allow you to only send needed styles down the wire to the user. This if often under 4kb. | ||
|
||
In the project directory, you can run: | ||
## Getting going | ||
|
||
### `npm start` | ||
Clone the directory | ||
``` | ||
``` | ||
|
||
Runs the app in the development mode.<br> | ||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. | ||
Install dependencies | ||
``` | ||
yarn | ||
``` | ||
|
||
The page will reload if you make edits.<br> | ||
You will also see any lint errors in the console. | ||
Start the dev environment | ||
``` | ||
yarn start | ||
``` | ||
|
||
### `npm test` | ||
## Elements | ||
``` | ||
src/elements/ | ||
``` | ||
This folder contains html elements wired up to styled system. Scales | ||
are defined and configurable in ```src/theme.js``` | ||
|
||
Launches the test runner in the interactive watch mode.<br> | ||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
If you edit this you will see the style guide update on the home page | ||
|
||
### `npm run build` | ||
|
||
Builds the app for production to the `build` folder.<br> | ||
It correctly bundles React in production mode and optimizes the build for the best performance. | ||
|
||
The build is minified and the filenames include the hashes.<br> | ||
Your app is ready to be deployed! | ||
|
||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
|
||
### `npm run eject` | ||
|
||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!** | ||
|
||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. | ||
|
||
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. | ||
|
||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. | ||
|
||
## Learn More | ||
|
||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). | ||
|
||
To learn React, check out the [React documentation](https://reactjs.org/). | ||
|
||
### Code Splitting | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting | ||
|
||
### Analyzing the Bundle Size | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size | ||
|
||
### Making a Progressive Web App | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app | ||
|
||
### Advanced Configuration | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration | ||
|
||
### Deployment | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment | ||
|
||
### `npm run build` fails to minify | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify |
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,26 +1,20 @@ | ||
import React from 'react'; | ||
import logo from './logo.svg'; | ||
import './App.css'; | ||
import React from 'react' | ||
import { ThemeProvider } from "emotion-theming" | ||
import { BrowserRouter as Router, Route, Link } from 'react-router-dom' | ||
import theme from './theme' | ||
import Home from './pages/Home' | ||
import Div from './elements/Div' | ||
|
||
function App() { | ||
return ( | ||
<div className="App"> | ||
<header className="App-header"> | ||
<img src={logo} className="App-logo" alt="logo" /> | ||
<p> | ||
Edit <code>src/App.js</code> and save to reload. | ||
</p> | ||
<a | ||
className="App-link" | ||
href="https://reactjs.org" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Learn React | ||
</a> | ||
</header> | ||
</div> | ||
<ThemeProvider theme={theme}> | ||
<Div style={{ fontFamily: theme.typefaces.sansSerif }}> | ||
<Router> | ||
<Route exact path='/' component={Home} /> | ||
</Router> | ||
</Div> | ||
</ThemeProvider> | ||
); | ||
} | ||
|
||
export default App; | ||
export default App |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,58 @@ | ||
import styled from "@emotion/styled" | ||
import Link from "next/link" | ||
|
||
import { | ||
space, | ||
width, | ||
maxWidth, | ||
display, | ||
alignItems, | ||
justifyContent, | ||
fontSize, | ||
fontWeight, | ||
textAlign, | ||
color, | ||
borders, | ||
borderColor, | ||
borderRadius | ||
} from "styled-system" | ||
|
||
const A = styled.a( | ||
space, | ||
width, | ||
maxWidth, | ||
display, | ||
fontSize, | ||
fontWeight, | ||
textAlign, | ||
color, | ||
alignItems, | ||
justifyContent, | ||
borders, | ||
borderColor, | ||
borderRadius, | ||
{ | ||
boxSizing: "border-box", | ||
textDecoration: "none", | ||
":hover": { | ||
cursor: "pointer" | ||
} | ||
} | ||
) | ||
|
||
A.defaultProps = { | ||
display: "inline-block", | ||
bg: "transparent", | ||
color: "gray.2", | ||
cursor: "pointer" | ||
} | ||
|
||
Link.defaultProps = { | ||
href: "#0" | ||
} | ||
|
||
export default ({ children, href, ...props }) => ( | ||
<Link href={href}> | ||
<A {...props}>{children}</A> | ||
</Link> | ||
) |
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,26 @@ | ||
import styled from "@emotion/styled" | ||
|
||
import { | ||
space, | ||
width, | ||
fontSize, | ||
fontWeight, | ||
textAlign, | ||
color, | ||
display | ||
} from "styled-system" | ||
|
||
const Abbr = styled.abbr( | ||
space, | ||
width, | ||
fontSize, | ||
fontWeight, | ||
textAlign, | ||
color, | ||
display, | ||
{} | ||
) | ||
|
||
Abbr.defaultProps = {} | ||
|
||
export default Abbr |
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,31 @@ | ||
import styled from "@emotion/styled" | ||
import { | ||
space, | ||
display, | ||
width, | ||
fontSize, | ||
lineHeight, | ||
textAlign, | ||
color, | ||
borders, | ||
borderColor, | ||
borderRadius, | ||
} from 'styled-system' | ||
|
||
const Address = styled.address( | ||
space, | ||
display, | ||
width, | ||
fontSize, | ||
lineHeight, | ||
textAlign, | ||
color, | ||
borders, | ||
borderColor, | ||
borderRadius, | ||
{}, | ||
) | ||
|
||
Address.defaultProps = {} | ||
|
||
export default Address |
Oops, something went wrong.