Skip to content

Commit

Permalink
Move jsdoc to PropTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill committed Jun 26, 2019
1 parent 6f8e112 commit 68a8323
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions client/src/components/LoadingError.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';
import CircleWarning from 'components/Icons/CircleWarning';

/**
* Renders an error screen, used for when a schema fetch fails in the
* MFA app, or if a method is unavailable to be used but is already
* selected in the verification process.
*
* @param {string} title
* @param {string} message
* @param {mixed} controls
* @returns {HTMLElement}
*/
export default ({ title, message, controls }) => (
const LoadingError = ({ title, message, controls }) => (
<div className="mfa-method mfa-method--unavailable">
<div className="mfa-method-icon mfa-method-icon--unavailable">
<CircleWarning size="80px" />
Expand All @@ -27,3 +23,11 @@ export default ({ title, message, controls }) => (
</div>
</div>
);

LoadingError.propTypes = {
title: PropTypes.string.isRequired,
message: PropTypes.string,
controls: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
};

export default LoadingError;

0 comments on commit 68a8323

Please sign in to comment.