diff options
ReadOnlyInput component.
Diffstat (limited to 'ui/app/components/readonly-input.js')
-rw-r--r-- | ui/app/components/readonly-input.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ui/app/components/readonly-input.js b/ui/app/components/readonly-input.js new file mode 100644 index 000000000..b688e0722 --- /dev/null +++ b/ui/app/components/readonly-input.js @@ -0,0 +1,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, + }), + ]) +} + |