You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

30 lines
991 B

  1. import _extends from "@babel/runtime/helpers/esm/extends";
  2. import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
  3. import React from 'react';
  4. import PropTypes from 'prop-types';
  5. import classNames from 'classnames';
  6. import { mapToCssModules, tagPropType } from './utils';
  7. var propTypes = {
  8. tag: tagPropType,
  9. className: PropTypes.string,
  10. cssModule: PropTypes.object
  11. };
  12. var defaultProps = {
  13. tag: 'span'
  14. };
  15. var InputGroupText = function InputGroupText(props) {
  16. var className = props.className,
  17. cssModule = props.cssModule,
  18. Tag = props.tag,
  19. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  20. var classes = mapToCssModules(classNames(className, 'input-group-text'), cssModule);
  21. return React.createElement(Tag, _extends({}, attributes, {
  22. className: classes
  23. }));
  24. };
  25. InputGroupText.propTypes = propTypes;
  26. InputGroupText.defaultProps = defaultProps;
  27. export default InputGroupText;