import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["className", "color", "id", "children"];
import * as React from 'react';
import Text from '../text/Text';
import cx from 'classnames';

var ErrorMessage = function ErrorMessage(_ref) {
  var className = _ref.className,
      _ref$color = _ref.color,
      color = _ref$color === void 0 ? 'text-red-60' : _ref$color,
      id = _ref.id,
      children = _ref.children,
      props = _objectWithoutProperties(_ref, _excluded);

  var errorMessageClass = cx('sg-error-message', className);
  return /*#__PURE__*/React.createElement(Text, _extends({}, props, {
    className: errorMessageClass,
    id: id,
    color: color,
    size: "small",
    as: "span",
    weight: "bold"
  }), children);
};

export default ErrorMessage;