UNPKG

@carbon/react

Version:

React components for the Carbon Design System

58 lines (56 loc) 1.99 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 { deprecate } from "../../prop-types/deprecate.js"; import { FormContext } from "../FluidForm/FormContext.js"; import TextArea_default from "../TextArea/index.js"; import classNames from "classnames"; import "react"; import PropTypes from "prop-types"; import { jsx } from "react/jsx-runtime"; //#region src/components/FluidTextArea/FluidTextArea.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 FluidTextArea = ({ className, ...other }) => { const classNames$1 = classNames(`${usePrefix()}--text-area--fluid`, className); return /* @__PURE__ */ jsx(FormContext.Provider, { value: { isFluid: true }, children: /* @__PURE__ */ jsx(TextArea_default, { className: classNames$1, ...other }) }); }; FluidTextArea.propTypes = { className: PropTypes.string, cols: PropTypes.number, defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), disabled: PropTypes.bool, enableCounter: PropTypes.bool, helperText: PropTypes.node, hideLabel: PropTypes.bool, id: PropTypes.string, invalid: PropTypes.bool, invalidText: PropTypes.node, labelText: PropTypes.node.isRequired, light: deprecate(PropTypes.bool, "The `light` prop for `FluidTextArea` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."), maxCount: PropTypes.number, onChange: PropTypes.func, onClick: PropTypes.func, placeholder: PropTypes.string, rows: PropTypes.number, value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), warn: PropTypes.bool, warnText: PropTypes.node, readOnly: PropTypes.bool }; //#endregion export { FluidTextArea as default };