mirror of
https://github.com/vale981/accounts-ui
synced 2025-03-04 17:31:41 -05:00
Removed manual calls to React.PropTypes
* Got a warning that a manual call to React.Proptypes won't be supported in production for the next major versions. * I just removed them for these three components and moved them inside the class definition.
This commit is contained in:
parent
22e9f39cca
commit
9b9943bebc
3 changed files with 12 additions and 9 deletions
|
@ -4,6 +4,10 @@ let Link;
|
|||
try { Link = require('react-router').Link; } catch(e) {}
|
||||
|
||||
export class Button extends React.Component {
|
||||
propTypes: {
|
||||
onClick: React.PropTypes.func
|
||||
}
|
||||
|
||||
render () {
|
||||
const {
|
||||
label,
|
||||
|
@ -27,8 +31,5 @@ export class Button extends React.Component {
|
|||
onClick={ onClick }>{ label }</button>;
|
||||
}
|
||||
}
|
||||
Button.propTypes = {
|
||||
onClick: React.PropTypes.func
|
||||
};
|
||||
|
||||
Accounts.ui.Button = Button;
|
||||
|
|
|
@ -2,6 +2,10 @@ import React from 'react';
|
|||
import { Accounts } from 'meteor/accounts-base';
|
||||
|
||||
export class Field extends React.Component {
|
||||
propTypes: {
|
||||
onChange: React.PropTypes.func
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
|
@ -68,8 +72,5 @@ export class Field extends React.Component {
|
|||
) : null;
|
||||
}
|
||||
}
|
||||
Field.propTypes = {
|
||||
onChange: React.PropTypes.func
|
||||
};
|
||||
|
||||
Accounts.ui.Field = Field;
|
||||
|
|
|
@ -4,6 +4,10 @@ import { T9n } from 'meteor/softwarerero:accounts-t9n';
|
|||
import { hasPasswordService } from '../../helpers.js';
|
||||
|
||||
export class PasswordOrService extends React.Component {
|
||||
propTypes: {
|
||||
oauthServices: React.PropTypes.object
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
|
@ -32,8 +36,5 @@ export class PasswordOrService extends React.Component {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
PasswordOrService.propTypes = {
|
||||
oauthServices: React.PropTypes.object
|
||||
};
|
||||
|
||||
Accounts.ui.PasswordOrService = PasswordOrService;
|
||||
|
|
Loading…
Add table
Reference in a new issue