changed proptypes definitions

This commit is contained in:
Joel Louzado 2017-04-27 18:46:03 +05:30
parent 79bfb36236
commit 69589bd442
5 changed files with 13 additions and 12 deletions

View file

@ -400,13 +400,14 @@ To install the dependencies added in your package.json run:
import React from 'react';
import { Accounts, STATES } from 'meteor/std:accounts-ui';
import PropTypes from 'prop-types'
/**
* Form.propTypes = {
* fields: React.PropTypes.object.isRequired,
* buttons: React.PropTypes.object.isRequired,
* error: React.PropTypes.string,
* ready: React.PropTypes.bool
* fields: PropTypes.object.isRequired,
* buttons: PropTypes.object.isRequired,
* error: PropTypes.string,
* ready: PropTypes.bool
* };
*/
class Form extends Accounts.ui.Form {

View file

@ -7,7 +7,7 @@ try { Link = require('react-router').Link; } catch(e) {}
export class Button extends React.Component {
propTypes: {
onClick: React.PropTypes.func
onClick: PropTypes.func
}
render () {

View file

@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
export class Field extends React.Component {
propTypes: {
onChange: React.PropTypes.func
onChange: PropTypes.func
}
constructor(props) {

View file

@ -12,11 +12,11 @@ import './FormMessages.jsx';
export class Form extends React.Component {
propTypes: {
oauthServices: React.PropTypes.object,
fields: React.PropTypes.object.isRequired,
buttons: React.PropTypes.object.isRequired,
error: React.PropTypes.string,
ready: React.PropTypes.bool
oauthServices: PropTypes.object,
fields: PropTypes.object.isRequired,
buttons: PropTypes.object.isRequired,
error: PropTypes.string,
ready: PropTypes.bool
};
componentDidMount() {

View file

@ -6,7 +6,7 @@ import { hasPasswordService } from '../../helpers.js';
export class PasswordOrService extends React.Component {
propTypes: {
oauthServices: React.PropTypes.object
oauthServices: PropTypes.object
}
constructor(props) {