Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Commit

Permalink
Add prop-types package and update code
Browse files Browse the repository at this point in the history
* React.PropTypes is deperecated and was throwing a warning in the
console.
  • Loading branch information
el-mapache committed Jul 5, 2017
1 parent c43ae0d commit 47f47b1
Show file tree
Hide file tree
Showing 66 changed files with 468 additions and 212 deletions.
198 changes: 194 additions & 4 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
"karma-jasmine-sinon": "^1.0.4",
"lighthouse": "^1.6.3",
"moxios": "^0.4.0",
"prop-types": "^15.5.10",
"react-addons-test-utils": "^15.4.2",
"react-dom": "^15.4.2",
"selenium-standalone": "^5.11.0",
Expand Down
17 changes: 9 additions & 8 deletions static_src/components/action.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

import PropTypes from 'prop-types';
import React from 'react';
import style from 'cloudgov-style/css/cloudgov-style.css';

Expand All @@ -21,14 +22,14 @@ const BUTTON_TYPES = [
];

const propTypes = {
children: React.PropTypes.any,
classes: React.PropTypes.array,
clickHandler: React.PropTypes.func,
disabled: React.PropTypes.bool,
href: React.PropTypes.string,
label: React.PropTypes.string,
style: React.PropTypes.oneOf(BUTTON_STYLES),
type: React.PropTypes.oneOf(BUTTON_TYPES)
children: PropTypes.any,
classes: PropTypes.array,
clickHandler: PropTypes.func,
disabled: PropTypes.bool,
href: PropTypes.string,
label: PropTypes.string,
style: PropTypes.oneOf(BUTTON_STYLES),
type: PropTypes.oneOf(BUTTON_TYPES)
};

const defaultProps = {
Expand Down
5 changes: 3 additions & 2 deletions static_src/components/activity_log.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

import PropTypes from 'prop-types';
import React from 'react';

import Action from './action.jsx';
Expand Down Expand Up @@ -39,8 +40,8 @@ function stateSetter(props) {
}

const propTypes = {
initialAppGuid: React.PropTypes.string.isRequired,
maxItems: React.PropTypes.number
initialAppGuid: PropTypes.string.isRequired,
maxItems: PropTypes.number
};

const defaultProps = {
Expand Down
10 changes: 5 additions & 5 deletions static_src/components/activity_log_item.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

import moment from 'moment-timezone';
import style from 'cloudgov-style/css/cloudgov-style.css';
import PropTypes from 'prop-types';
import React from 'react';

import createStyler from '../util/create_styler';
import ElasticLine from './elastic_line.jsx';
import ElasticLineItem from './elastic_line_item.jsx';
Expand Down Expand Up @@ -194,8 +194,8 @@ export default class ActivityLogItem extends React.Component {
}

ActivityLogItem.propTypes = {
domain: React.PropTypes.object,
item: React.PropTypes.object.isRequired,
route: React.PropTypes.object,
service: React.PropTypes.object
domain: PropTypes.object,
item: PropTypes.object.isRequired,
route: PropTypes.object,
service: PropTypes.object
};
5 changes: 3 additions & 2 deletions static_src/components/app_count_status.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

import PropTypes from 'prop-types';
import React from 'react';

import createStyler from '../util/create_styler';
Expand All @@ -9,8 +10,8 @@ import { entityHealth } from '../constants.js';
import { appHealth, worstHealth } from '../util/health';

const propTypes = {
appCount: React.PropTypes.number,
apps: React.PropTypes.array
appCount: PropTypes.number,
apps: PropTypes.array
};

const defaultProps = {
Expand Down
3 changes: 2 additions & 1 deletion static_src/components/app_list.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

import PropTypes from 'prop-types';
import React from 'react';

import style from 'cloudgov-style/css/cloudgov-style.css';
Expand Down Expand Up @@ -103,7 +104,7 @@ export default class AppList extends React.Component {
}

AppList.propTypes = {
initialApps: React.PropTypes.array
initialApps: PropTypes.array
};

AppList.defaultProps = {
Expand Down
Loading

0 comments on commit 47f47b1

Please sign in to comment.