aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js
blob: 631cf58039f88add5e6b32cd4e66867e3a556b6b (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import React from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames'

const ConfirmDetailRow = props => {
  const {
    label,
    fiatFee,
    ethFee,
    onHeaderClick,
    fiatFeeColor,
    headerText,
    headerTextClassName,
  } = props

  return (
    <div className="confirm-detail-row">
      <div className="confirm-detail-row__label">
        { label }
      </div>
      <div className="confirm-detail-row__details">
        <div
          className={classnames('confirm-detail-row__header-text', headerTextClassName)}
          onClick={() => onHeaderClick && onHeaderClick()}
        >
          { headerText }
        </div>
        <div
          className="confirm-detail-row__fiat"
          style={{ color: fiatFeeColor }}
        >
          { fiatFee }
        </div>
        <div className="confirm-detail-row__eth">
          { `\u2666 ${ethFee}` }
        </div>
      </div>
    </div>
  )
}

ConfirmDetailRow.propTypes = {
  label: PropTypes.string,
  fiatFee: PropTypes.string,
  ethFee: PropTypes.string,
  fiatFeeColor: PropTypes.string,
  onHeaderClick: PropTypes.func,
  headerText: PropTypes.string,
  headerTextClassName: PropTypes.string,
}

export default ConfirmDetailRow