You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
714 B
24 lines
714 B
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; |