"use strict";

exports.__esModule = true;
exports.default = void 0;

var _react = _interopRequireDefault(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * @category controls
 * @component form
 * @variations collab-ui-react
 **/
var FormSubSection = function FormSubSection(props) {
  var label = props.label,
      children = props.children,
      description = props.description;
  return _react.default.createElement("div", {
    className: "sub-section"
  }, label && _react.default.createElement("h5", {
    className: "sub-section__label"
  }, label), description && _react.default.createElement("p", {
    className: "sub-section__description"
  }, description), children);
};

FormSubSection.propTypes = {
  /**
   * optional label prop type
   */
  label: _propTypes.default.string,

  /**
   * optional description prop type
   */
  description: _propTypes.default.string,

  /**
   * optional children prop type
   */
  children: _propTypes.default.node
};
FormSubSection.defaultProps = {
  label: '',
  description: '',
  children: null
};
FormSubSection.displayName = 'FormSubSection';
var _default = FormSubSection;
/**
* @name Form Sub Section
* @description Forms are useful.
*
* @category controls
* @component form
* @section Form Sub Section
*
* @js

import {
  FormSubSection,
  Input
} from '@collab-ui/react';

export default function Default() {
    return (
      <div className='row'>
        <br />
        <FormSubSection
          label='Subsection Label'
          description='Subsection Description lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse sit amet hendrerit turpis, in accumsan quam.'
        >
          <Input
            htmlId='testMe2'
            value='testMe2'
            name='testMe2'
            label='First Input'
            disabled
            placeholder='Disabled Input'
            onChange={() => {}}
            inputHelpText='Field Must be Disabled'
            errorArr={[]}
          />
        </FormSubSection>
      </div>
    );
  }

**/

exports.default = _default;