Skip to content

Commit e6371f0

Browse files
committed
Update and merge dependencies
2 parents 5eb5330 + 0601b95 commit e6371f0

File tree

7 files changed

+39
-51
lines changed

7 files changed

+39
-51
lines changed

dist/bundle.js

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

dist/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"react": "^0.14.7",
3737
"react-dom": "^0.14.7",
3838
"react-dropzone": "^3.3.2",
39-
"tinycolor2": "^1.3.0"
39+
"tinycolor2": "^1.3.0",
40+
"base64-image-utils": "^0.1.0"
4041
}
4142
}

src/App.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const tinycolor = require('tinycolor2')
44
const _ = require('lodash')
55
const Dropzone = require('react-dropzone')
66

7-
const base64ImageToRGBArray = require('./lib/base64ImageToRGBArray')
7+
const {base64ImageToRGBMatrix} = require('base64-image-utils')
88

99
function compressColor (rgb) {
1010
const hex = tinycolor(rgb).toHexString()
@@ -58,11 +58,11 @@ var App = React.createClass({
5858
}
5959
}
6060

61-
base64ImageToRGBArray(base64, (err, data) => {
61+
base64ImageToRGBMatrix(base64, (err, data) => {
6262
if (err) return console.error(err)
6363

6464
this.setState({
65-
rgbArray: data,
65+
rgbMatrix: data,
6666
loadingImage: false
6767
})
6868
})
@@ -71,9 +71,9 @@ var App = React.createClass({
7171
},
7272

7373
render () {
74-
var {rgbArray, loadingImage} = this.state
74+
var {rgbMatrix, loadingImage} = this.state
7575

76-
var masterShadow = _.map(rgbArray, (row, rowIndex) => {
76+
var masterShadow = _.map(rgbMatrix, (row, rowIndex) => {
7777
return _.map(row, (col, colIndex) => {
7878
var color = compressColor(`rgb(${col.r},${col.g},${col.b})`)
7979

@@ -88,7 +88,7 @@ var App = React.createClass({
8888
{loadingImage ? 'Processing...' : 'Drop an image here, or click to upload.'}
8989
</Dropzone>
9090

91-
{rgbArray && (
91+
{rgbMatrix && (
9292
<div>
9393
<div className='tutorial'>
9494
This is your pure css (and single div) image! Enjoy! {masterShadow.length.toLocaleString()}b
@@ -98,7 +98,7 @@ var App = React.createClass({
9898
height: 1,
9999
width: 1,
100100
boxShadow: masterShadow,
101-
marginBottom: rgbArray.length
101+
marginBottom: rgbMatrix.length
102102
}} />
103103

104104
<div className='tutorial'>

src/lib/base64ImageToRGBArray.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

static/bundle.js

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

static/bundle.js.map

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

0 commit comments

Comments
 (0)