UNPKG

@carbon/react

Version:

React components for the Carbon Design System

39 lines (37 loc) 1.12 kB
/** * Copyright IBM Corp. 2016, 2026 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { usePrefix } from "../../internal/usePrefix.js"; import Form from "../Form/Form.js"; import { FormContext } from "./FormContext.js"; import classNames from "classnames"; import "react"; import PropTypes from "prop-types"; import { jsx } from "react/jsx-runtime"; //#region src/components/FluidForm/FluidForm.tsx /** * Copyright IBM Corp. 2016, 2025 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ const FluidForm = ({ className, children, ...other }) => { const classNames$1 = classNames(`${usePrefix()}--form--fluid`, className); return /* @__PURE__ */ jsx(FormContext.Provider, { value: { isFluid: true }, children: /* @__PURE__ */ jsx(Form, { className: classNames$1, ...other, children }) }); }; FluidForm.propTypes = { children: PropTypes.node, className: PropTypes.string }; //#endregion export { FluidForm as default };