Skip to content

Commit

Permalink
fix: migrate to prop-types module (React.PropTypes is deprecated)
Browse files Browse the repository at this point in the history
  • Loading branch information
vovkasm committed Jun 24, 2017
1 parent 15dd536 commit 1cd5750
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export default s

```javascript
// some component, Item.js for ex
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'
import { Image, Text, View } from 'react-native'
import { stylable } from 'react-native-stylable'

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"tape-eslint": "^1.2.1"
},
"dependencies": {
"hoist-non-react-statics": "^1.2.0"
"hoist-non-react-statics": "^1.2.0",
"prop-types": "^15.5.4"
}
}
3 changes: 2 additions & 1 deletion src/Provider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Children, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Children } from 'react'

/**
* Provides style sheet to its childs
Expand Down
3 changes: 2 additions & 1 deletion src/stylable.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'
import hoistStatics from 'hoist-non-react-statics'

import Node from './node'
Expand Down
3 changes: 2 additions & 1 deletion test/stylable.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import test from 'tape'
import { mount } from 'enzyme'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import { StyleProvider, Stylesheet, stylable } from '../src'

Expand Down

0 comments on commit 1cd5750

Please sign in to comment.