import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["className", "children", "id"];
import PropTypes from 'prop-types';
import React from 'react';
import classnames from 'classnames';
import { settings } from '../../globals/js';
var prefix = settings.prefix;
/** Form Label can be used whenever it is needed to show a label detached from a regular input. */

var FormLabel = function FormLabel(_ref) {
  var className = _ref.className,
      children = _ref.children,
      id = _ref.id,
      other = _objectWithoutProperties(_ref, _excluded);

  var classNames = classnames("".concat(prefix, "--label"), className);
  return /*#__PURE__*/React.createElement("label", _extends({
    htmlFor: id,
    className: classNames
  }, other), children);
};

FormLabel.propTypes = {
  /**
   * The content of the label
   */
  children: PropTypes.node,

  /**
   * Additional `class` attributes
   */
  className: PropTypes.string,

  /**
   * The ID of the related input which will be used as `htmlFor`
   */
  id: PropTypes.string
};
export default FormLabel;