File tree Expand file tree Collapse file tree 3 files changed +16
-18
lines changed Expand file tree Collapse file tree 3 files changed +16
-18
lines changed Original file line number Diff line number Diff line change 77 "env" : {
88 "production" : {
99 "plugins" : [
10- " dev-expression "
10+ " transform-react-remove-prop-types "
1111 ]
1212 }
1313 }
Original file line number Diff line number Diff line change @@ -2,6 +2,19 @@ import React, { PropTypes } from 'react'
22import json2mq from 'json2mq'
33
44class Media extends React . Component {
5+ static propTypes = {
6+ query : PropTypes . oneOfType ( [
7+ PropTypes . string ,
8+ PropTypes . object ,
9+ PropTypes . arrayOf ( PropTypes . object . isRequired )
10+ ] ) . isRequired ,
11+ render : PropTypes . func ,
12+ children : PropTypes . oneOfType ( [
13+ PropTypes . node ,
14+ PropTypes . func
15+ ] )
16+ }
17+
518 state = {
619 matches : true
720 }
@@ -40,19 +53,4 @@ class Media extends React.Component {
4053 }
4154}
4255
43- if ( __DEV__ ) {
44- Media . propTypes = {
45- query : PropTypes . oneOfType ( [
46- PropTypes . string ,
47- PropTypes . object ,
48- PropTypes . arrayOf ( PropTypes . object . isRequired )
49- ] ) . isRequired ,
50- render : PropTypes . func ,
51- children : PropTypes . oneOfType ( [
52- PropTypes . node ,
53- PropTypes . func
54- ] )
55- }
56- }
57-
5856export default Media
Original file line number Diff line number Diff line change 33 "version" : " 1.4.0" ,
44 "description" : " A CSS media query component for React" ,
55 "repository" : " ReactTraining/react-media" ,
6- "author" : " Michael Jackson" ,
76 "license" : " MIT" ,
7+ "author" : " Michael Jackson" ,
88 "scripts" : {
99 "build" : " node ./tools/build.js" ,
1010 "clean" : " git clean -e '!node_modules' -fdX ." ,
2020 "babel-cli" : " ^6.11.4" ,
2121 "babel-eslint" : " ^7.0.0" ,
2222 "babel-loader" : " ^6.2.4" ,
23- "babel-plugin-dev-expression " : " ^0.2.1 " ,
23+ "babel-plugin-transform-react-remove-prop-types " : " ^0.3.2 " ,
2424 "babel-preset-es2015" : " ^6.14.0" ,
2525 "babel-preset-react" : " ^6.11.1" ,
2626 "babel-preset-stage-1" : " ^6.5.0" ,
You can’t perform that action at this time.
0 commit comments