UNPKG

742 BJavaScriptView Raw
1"use client";
2
3import classNames from 'classnames';
4import * as React from 'react';
5import { useBootstrapPrefix } from './ThemeProvider';
6import { jsx as _jsx } from "react/jsx-runtime";
7const FormText = /*#__PURE__*/React.forwardRef(
8// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
9({
10 bsPrefix,
11 className,
12 as: Component = 'small',
13 muted,
14 ...props
15}, ref) => {
16 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-text');
17 return /*#__PURE__*/_jsx(Component, {
18 ...props,
19 ref: ref,
20 className: classNames(className, bsPrefix, muted && 'text-muted')
21 });
22});
23FormText.displayName = 'FormText';
24export default FormText;
\No newline at end of file