Dashboard sipadu mbip
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

FormText.js 1.0KB

12345678910111213141516171819202122
  1. import _extends from "@babel/runtime/helpers/esm/extends";
  2. import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
  3. import classNames from 'classnames';
  4. import React from 'react';
  5. import { useBootstrapPrefix } from './ThemeProvider';
  6. var FormText = React.forwardRef( // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
  7. function (_ref, ref) {
  8. var bsPrefix = _ref.bsPrefix,
  9. className = _ref.className,
  10. _ref$as = _ref.as,
  11. Component = _ref$as === void 0 ? 'small' : _ref$as,
  12. muted = _ref.muted,
  13. props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "className", "as", "muted"]);
  14. bsPrefix = useBootstrapPrefix(bsPrefix, 'form-text');
  15. return React.createElement(Component, _extends({}, props, {
  16. ref: ref,
  17. className: classNames(className, bsPrefix, muted && 'text-muted')
  18. }));
  19. });
  20. FormText.displayName = 'FormText';
  21. export default FormText;