-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: upgrade react & friends, add prettier (#26)
* deps: upgraded react & friends, added prettier * deps: upgrade babel and eslint * ci: change node test version
- Loading branch information
Showing
10 changed files
with
2,314 additions
and
623 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"trailingComma": "es5" | ||
} |
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,5 +1,4 @@ | ||
language: node_js | ||
node_js: | ||
- "6" | ||
- "8" | ||
script: npm run lint | ||
|
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,11 +1,9 @@ | ||
import gradients from './gradient_list.json'; | ||
import gradients from "./gradient_list.json"; | ||
|
||
function randomGradientName() { | ||
const keys = Object.keys(gradients); | ||
const index = Math.floor(Math.random() * keys.length); | ||
return keys[index]; | ||
} | ||
|
||
|
||
export { gradients, randomGradientName }; | ||
|
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,5 +1,4 @@ | ||
import generator from './generator'; | ||
import Gradient from './components/gradient'; | ||
import generator from "./generator"; | ||
import Gradient from "./components/gradient"; | ||
|
||
export { generator, Gradient }; | ||
|
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,40 +1,48 @@ | ||
import React from 'react'; | ||
import { storiesOf, action, linkTo } from '@kadira/storybook'; | ||
import styled from 'styled-components'; | ||
import { gradients } from '../src/gradients.js'; | ||
import Gradient from '../src/components/gradient.js'; | ||
import React from "react"; | ||
import { storiesOf, action, linkTo } from "@kadira/storybook"; | ||
import styled from "styled-components"; | ||
import { gradients } from "../src/gradients.js"; | ||
import Gradient from "../src/components/gradient.js"; | ||
|
||
const Preview = styled(Gradient)` | ||
border-radius: 4px; | ||
box-shadow: 0 2px 10px rgba(0, 0, 0, .1); | ||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); | ||
color: #fff; | ||
font-family: sans-serif; | ||
margin-bottom: 10px; | ||
padding: 50px; | ||
text-align: center; | ||
text-shadow: 0 1px 4px rgba(0, 0, 0, .6); | ||
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); | ||
`; | ||
|
||
const map = new Map(Object.entries(gradients)); | ||
|
||
const GradientPreviews = []; | ||
|
||
map.forEach(function (value, key) { | ||
map.forEach(function(value, key) { | ||
GradientPreviews.push(key); | ||
}); | ||
|
||
storiesOf('Gradient Component', module) | ||
.add('Linear Gradient Previews', () => ( | ||
storiesOf("Gradient Component", module) | ||
.add("Linear Gradient Previews", () => ( | ||
<div> | ||
{GradientPreviews.map(function (value, id) { | ||
return (<Preview gradient={value} key={id}>{value}</Preview>) | ||
{GradientPreviews.map(function(value, id) { | ||
return ( | ||
<Preview gradient={value} key={id}> | ||
{value} | ||
</Preview> | ||
); | ||
})} | ||
</div> | ||
)) | ||
.add('Radial Gradient Previews', () => ( | ||
.add("Radial Gradient Previews", () => ( | ||
<div> | ||
{GradientPreviews.map(function (value, id) { | ||
return (<Preview gradient={value} key={id} type={'radial'}>{value}</Preview>) | ||
{GradientPreviews.map(function(value, id) { | ||
return ( | ||
<Preview gradient={value} key={id} type={"radial"}> | ||
{value} | ||
</Preview> | ||
); | ||
})} | ||
</div> | ||
)); |
Oops, something went wrong.