diff --git a/src/pages/signin/SignInPageLayout/BackgroundImage/index.android.js b/src/pages/signin/SignInPageLayout/BackgroundImage/index.android.js index ee6a2f1aa418..6ce60fc364fd 100644 --- a/src/pages/signin/SignInPageLayout/BackgroundImage/index.android.js +++ b/src/pages/signin/SignInPageLayout/BackgroundImage/index.android.js @@ -1,3 +1,19 @@ -import backgroundImage from '../../../../../assets/images/home-background--android.svg'; +import React from 'react'; +import AndroidBackgroundImage from '../../../../../assets/images/home-background--android.svg'; +import styles from '../../../../styles/styles'; +import defaultPropTypes from './propTypes'; -export default backgroundImage; +function BackgroundImage(props) { + return ( + + ); +} + +BackgroundImage.displayName = 'BackgroundImage'; +BackgroundImage.propTypes = defaultPropTypes; + +export default BackgroundImage; diff --git a/src/pages/signin/SignInPageLayout/BackgroundImage/index.js b/src/pages/signin/SignInPageLayout/BackgroundImage/index.js index d8c621509314..710f7b373a81 100644 --- a/src/pages/signin/SignInPageLayout/BackgroundImage/index.js +++ b/src/pages/signin/SignInPageLayout/BackgroundImage/index.js @@ -3,15 +3,17 @@ import PropTypes from 'prop-types'; import MobileBackgroundImage from '../../../../../assets/images/home-background--mobile.svg'; import DesktopBackgroundImage from '../../../../../assets/images/home-background--desktop.svg'; import styles from '../../../../styles/styles'; +import defaultPropTypes from './propTypes'; const defaultProps = { isSmallScreen: false, }; const propTypes = { + /** Is the window width narrow, like on a mobile device */ isSmallScreen: PropTypes.bool, - pointerEvents: PropTypes.string.isRequired, - width: PropTypes.number.isRequired, + + ...defaultPropTypes, }; function BackgroundImage(props) { return props.isSmallScreen ? ( diff --git a/src/pages/signin/SignInPageLayout/BackgroundImage/propTypes.js b/src/pages/signin/SignInPageLayout/BackgroundImage/propTypes.js new file mode 100644 index 000000000000..533d22ad12c5 --- /dev/null +++ b/src/pages/signin/SignInPageLayout/BackgroundImage/propTypes.js @@ -0,0 +1,11 @@ +import PropTypes from 'prop-types'; + +const propTypes = { + /** pointerEvents property to the SVG element */ + pointerEvents: PropTypes.string.isRequired, + + /** The width of the image. */ + width: PropTypes.number.isRequired, +}; + +export default propTypes;