Skip to content

Commit

Permalink
Update PropTypes import and fix minor linting errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
yamafaktory committed Apr 18, 2017
1 parent a80e9bc commit 9e536a6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/react.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import assign from 'object-assign'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'
import { isLikeRule, style, merge } from './index.js'

if(process.env.NODE_ENV === 'development' || !process.env.NODE_ENV) {
console.warn('[Deprecation] In glamor v3 this file will be published as a standalone package: "glamor-react". See https://github.com/threepointone/glamor/issues/204 for more information.')
console.warn('[Deprecation] In glamor v3 this file will be published as a standalone package: "glamor-react". See https://github.com/threepointone/glamor/issues/204 for more information.') // eslint-disable-line no-console
}

export * from './index.js' // convenience
Expand Down Expand Up @@ -40,7 +41,7 @@ export function vars(value = {}) {
return {
glamorCssVars: {
...this.context.glamorCssVars,
...typeof value === 'function' ? value(this.props) : value
...((typeof value === 'function' ? value(this.props) : value))
}
}
}
Expand Down Expand Up @@ -94,7 +95,7 @@ export function makeTheme() {
[key]: [ typeof _style === 'function' ?
_style(this.props) :
_style,
...this.context[key] || [] ]
...(this.context[key] || []) ]
}
}
render() {
Expand Down Expand Up @@ -125,7 +126,7 @@ export function propMerge(mergeStyle, props) {
}

if (glamorStyleKeys.length > 1) {
console.warn('[glamor] detected multiple data attributes on an element. This may lead to unexpected style because of css insertion order.');
console.warn('[glamor] detected multiple data attributes on an element. This may lead to unexpected style because of css insertion order.') // eslint-disable-line no-console

// just append "mergeStyle" to props, because we dunno in which order glamor styles were added to props
return {
Expand Down

0 comments on commit 9e536a6

Please sign in to comment.