aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/modals/notification/notification.component.js
blob: 1af2f3ca8e9db2ad2665d384b02600aac99388f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import React from 'react'
import PropTypes from 'prop-types'
import Button from '../../button'

const Notification = (props, context) => {
  return (
    <div className="modal-container">
      { props.children }
      <div className="modal-container__footer">
        <Button
          type="primary"
          onClick={() => props.onHide()}
        >
          { context.t('ok') }
        </Button>
      </div>
    </div>
  )
}

Notification.propTypes = {
  onHide: PropTypes.func.isRequired,
  children: PropTypes.element,
}

Notification.contextTypes = {
  t: PropTypes.func,
}

export default Notification