Files
est-frame/node_modules/react-bootstrap/esm/FormCheckLabel.js
2025-10-22 05:38:27 +00:00

27 lines
733 B
JavaScript
Executable File

"use client";
import classNames from 'classnames';
import * as React from 'react';
import { useContext } from 'react';
import FormContext from './FormContext';
import { useBootstrapPrefix } from './ThemeProvider';
import { jsx as _jsx } from "react/jsx-runtime";
const FormCheckLabel = /*#__PURE__*/React.forwardRef(({
bsPrefix,
className,
htmlFor,
...props
}, ref) => {
const {
controlId
} = useContext(FormContext);
bsPrefix = useBootstrapPrefix(bsPrefix, 'form-check-label');
return /*#__PURE__*/_jsx("label", {
...props,
ref: ref,
htmlFor: htmlFor || controlId,
className: classNames(className, bsPrefix)
});
});
FormCheckLabel.displayName = 'FormCheckLabel';
export default FormCheckLabel;