How to use the reactstrap.FormGroup.propTypes function in reactstrap

To help you get started, we’ve selected a few reactstrap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Availity / availity-reactstrap-validation / src / AvRadioGroup.js View on Github external
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import isEqual from 'lodash/isEqual';
import isUndefined from 'lodash/isUndefined';
import { FormGroup } from 'reactstrap';
import classNames from 'classnames';
import AvFeedback from './AvFeedback';

const htmlValidationAttrs = ['required'];

const noop = () => {};

export default class AvRadioGroup extends Component {
  static propTypes = Object.assign({}, FormGroup.propTypes, {
    name: PropTypes.string.isRequired,
  });

  static contextTypes = {
    FormCtrl: PropTypes.object.isRequired,
  };

  static childContextTypes = {
    Group: PropTypes.object.isRequired,
    FormCtrl: PropTypes.object.isRequired,
  };

  state = {
    invalidInputs: {},
    dirtyInputs: {},
    touchedInputs: {},
github italia / design-react-kit / src / components / FormGroup / FormGroup.js View on Github external
return React.cloneElement(child, {
                ...child.props,
                className: classNames,
              });
            default:
              return child;
          }
        }))()}
      
    );
  }
}

FormGroup.defaultProps = ReactStrapFormGroup.defaultProps;
FormGroup.propTypes = ReactStrapFormGroup.propTypes;

export default FormGroup;
github Availity / availity-reactstrap-validation / src / AvGroup.js View on Github external
import React, {Component} from 'react';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import { FormGroup } from 'reactstrap';

export default class AvGroup extends Component {
  static propTypes = Object.assign({}, FormGroup.propTypes);

  static contextTypes = {
    FormCtrl: PropTypes.object.isRequired,
  };

  static childContextTypes = {
    Group: PropTypes.object.isRequired,
    FormCtrl: PropTypes.object.isRequired,
  };

  constructor(props) {
    super(props);

    this.state = {input: {props: {}}};
  }
github italia / design-react-kit / dist / design-react-kit.es.js View on Github external
return React.cloneElement(child, _extends({}, child.props, {
              className: classNames
            }));

          default:
            return child;
        }
      });
    }());
  };

  return FormGroup;
}(Component);

FormGroup.defaultProps = FormGroup$1.defaultProps;
FormGroup.propTypes = FormGroup$1.propTypes;

/**
 * HeaderContext
 * {
 *  type: PropTypes.oneOf([SLIM, CENTER, NAVBAR]).isRequired
 * }
 */

var HeaderContext = React.createContext({});
var SLIM = 'slim';
var CENTER = 'center';
var NAVBAR = 'navbar';

var propTypes$d = {
  /** Classi addizionali per il componente Header */
  className: PropTypes.string,
github Availity / availity-reactstrap-validation / src / AvCheckboxGroup.js View on Github external
import React, { Component } from 'react';
import { findDOMNode } from 'react-dom';
import PropTypes from 'prop-types';
import isEqual from 'lodash/isEqual';
import isUndefined from 'lodash/isUndefined';
import { FormGroup } from 'reactstrap';
import classNames from 'classnames';
import AvFeedback from './AvFeedback';

const htmlValidationAttrs = ['required'];

const noop = () => {};

export default class AvCheckboxGroup extends Component {
  static propTypes = Object.assign({}, FormGroup.propTypes, {
    name: PropTypes.string.isRequired,
  });

  static contextTypes = {
    FormCtrl: PropTypes.object.isRequired,
  };

  static childContextTypes = {
    Group: PropTypes.object.isRequired,
    FormCtrl: PropTypes.object.isRequired,
  };

  state = {
    invalidInputs: {},
    dirtyInputs: {},
    touchedInputs: {},