UNPKG

723 BJavaScriptView Raw
1import classNames from 'classnames';
2import * as React from 'react';
3import { useBootstrapPrefix } from './ThemeProvider';
4import { jsx as _jsx } from "react/jsx-runtime";
5const 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
6({
7 bsPrefix,
8 className,
9 as: Component = 'small',
10 muted,
11 ...props
12}, ref) => {
13 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-text');
14 return /*#__PURE__*/_jsx(Component, { ...props,
15 ref: ref,
16 className: classNames(className, bsPrefix, muted && 'text-muted')
17 });
18});
19FormText.displayName = 'FormText';
20export default FormText;
\No newline at end of file