mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 17:35:16 +00:00
23 lines
1.1 KiB
JavaScript
23 lines
1.1 KiB
JavaScript
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
||
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
||
|
var _excluded = ["bsPrefix", "className", "as", "muted"];
|
||
|
import classNames from 'classnames';
|
||
|
import React from 'react';
|
||
|
import { useBootstrapPrefix } from './ThemeProvider';
|
||
|
var FormText = /*#__PURE__*/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
|
||
|
function (_ref, ref) {
|
||
|
var bsPrefix = _ref.bsPrefix,
|
||
|
className = _ref.className,
|
||
|
_ref$as = _ref.as,
|
||
|
Component = _ref$as === void 0 ? 'small' : _ref$as,
|
||
|
muted = _ref.muted,
|
||
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
||
|
|
||
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'form-text');
|
||
|
return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
||
|
ref: ref,
|
||
|
className: classNames(className, bsPrefix, muted && 'text-muted')
|
||
|
}));
|
||
|
});
|
||
|
FormText.displayName = 'FormText';
|
||
|
export default FormText;
|