mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-02 14:15:06 +01:00
34 lines
736 B
JavaScript
34 lines
736 B
JavaScript
import PropTypes from 'prop-types'
|
|
import React, {PureComponent} from 'react'
|
|
|
|
export default class UiMigrationAnnouncement extends PureComponent {
|
|
static contextTypes = {
|
|
t: PropTypes.func.isRequired,
|
|
}
|
|
|
|
static defaultProps = {
|
|
shouldShowAnnouncement: true,
|
|
};
|
|
|
|
static propTypes = {
|
|
onClose: PropTypes.func.isRequired,
|
|
shouldShowAnnouncement: PropTypes.bool,
|
|
}
|
|
|
|
render () {
|
|
const { t } = this.context
|
|
const { onClose, shouldShowAnnouncement } = this.props
|
|
|
|
if (!shouldShowAnnouncement) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<div className="ui-migration-announcement">
|
|
<p>{t('uiMigrationAnnouncement')}</p>
|
|
<p onClick={onClose}>{t('close')}</p>
|
|
</div>
|
|
)
|
|
}
|
|
}
|