All files CodeMirror.js

0% Statements 0/7
0% Branches 0/2
0% Functions 0/1
0% Lines 0/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18                                   
import React from 'react'
import { Field } from 'redux-form'
import PropTypes from 'prop-types'
import { CodeMirrorCore } from './CodeMirrorCore'
 
const CodeMirror = props => <Field {...props} name={props.source ? `${props.source}.${props.name}` : props.name} component={CodeMirrorCore} />
 
CodeMirror.propTypes = {
  name: PropTypes.string.isRequired,
  label: PropTypes.string.isRequired,
  type: PropTypes.string.isRequired,
  defaultValue: PropTypes.string,
  required: PropTypes.bool,
  validate: PropTypes.func
}
 
export { CodeMirror }