1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-02 14:15:06 +01:00
metamask-extension/ui/app/components/ui-migration-annoucement/ui-migration-annoucement.component.js
2019-02-05 08:49:55 -03:30

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>
)
}
}