import {defineMessages, FormattedMessage, intlShape, injectIntl} from 'react-intl'; import PropTypes from 'prop-types'; import React from 'react'; import Box from '../box/box.jsx'; import Modal from '../../containers/modal.jsx'; import classNames from 'classnames'; import styles from './username-modal.css'; import isScratchDesktop from '../../lib/isScratchDesktop.js'; const messages = defineMessages({ title: { defaultMessage: 'Change Username', description: 'Title change username modal', id: 'tw.usernameModal.title' } }); const UsernameModalComponent = props => ( {props.mustChangeUsername &&

) }} />

} {isScratchDesktop() ? (

) : null} {isScratchDesktop() ? ( null ) : (

)}
); UsernameModalComponent.propTypes = { intl: intlShape, mustChangeUsername: PropTypes.bool.isRequired, value: PropTypes.string.isRequired, valueValid: PropTypes.bool.isRequired, onCancel: PropTypes.func.isRequired, onChange: PropTypes.func.isRequired, onFocus: PropTypes.func.isRequired, onKeyPress: PropTypes.func.isRequired, onOk: PropTypes.func.isRequired, onReset: PropTypes.func.isRequired }; export default injectIntl(UsernameModalComponent);