mirror of
https://github.com/vale981/accounts-ui
synced 2025-03-04 17:31:41 -05:00
Added documentation.
This commit is contained in:
parent
c948fd3462
commit
4a34ee2200
2 changed files with 6 additions and 5 deletions
|
@ -4,6 +4,7 @@ import { Accounts } from 'meteor/accounts-base';
|
|||
export class FormMessage extends React.Component {
|
||||
render () {
|
||||
let { message, type, className = "message", style = {}, deprecated } = this.props;
|
||||
// XXX Check for deprecations.
|
||||
if (deprecated) {
|
||||
// Found backwords compatibility issue.
|
||||
console.warn('You are overriding Accounts.ui.Form and using FormMessage, the use of FormMessage in Form has been depreacted in v1.3.0, update your implementation to use FormMessages: https://github.com/studiointeract/accounts-ui/#deprecations');
|
||||
|
|
|
@ -904,14 +904,14 @@ export class LoginForm extends Tracker.Component {
|
|||
this.setState({ messages: [] });
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
// Check for backwards compatibility.
|
||||
this.props.message = 'test';
|
||||
componentDidMount() {
|
||||
// XXX Check for backwards compatibility.
|
||||
const container = document.createElement('div');
|
||||
ReactDOM.render(<Accounts.ui.Field message="test" />, container);
|
||||
if (container.getElementsByClassName('message').length == 0) {
|
||||
// Found backwards compatibility issue with 1.3.x
|
||||
console.warn('Implementations of Accounts.ui.Field must render message in v1.3.0 https://github.com/studiointeract/accounts-ui/#deprecations');
|
||||
console.warn(`Implementations of Accounts.ui.Field must render message in v1.3.0.
|
||||
https://github.com/studiointeract/accounts-ui/#deprecations`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -923,7 +923,7 @@ export class LoginForm extends Tracker.Component {
|
|||
|
||||
render() {
|
||||
this.oauthButtons();
|
||||
// Backwords compatibility with v1.3.x.
|
||||
// Backwords compatibility with v1.2.x.
|
||||
const { messages = [] } = this.state;
|
||||
const message = {
|
||||
deprecated: true,
|
||||
|
|
Loading…
Add table
Reference in a new issue