aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/readonly-input.js
blob: 934cbefae5d235c61d7af48eebb77af594b5df2b (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
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits

module.exports = ReadOnlyInput

inherits(ReadOnlyInput, Component)
function ReadOnlyInput () {
  Component.call(this)
}

ReadOnlyInput.prototype.render = function () {
  const {
    wrapperClass = '',
    inputClass = '',
    value,
  } = this.props

  return h('div', {className: wrapperClass}, [
    h('input', {
      className: inputClass,
      value,
      readOnly: true,
    }),
  ])
}