From 5c1f032c0d17d99c9eb6e581e90d97f43b3d4e6d Mon Sep 17 00:00:00 2001 From: Lee Chase Date: Tue, 25 Oct 2022 15:16:57 +0100 Subject: [PATCH 1/4] feat: readonly text input --- .../react/src/components/TextArea/TextArea.js | 13 +++++-- .../TextArea/__tests__/TextArea-test.js | 39 +++++++++++++++++++ .../scss/components/text-area/_text-area.scss | 7 ++++ 3 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 packages/react/src/components/TextArea/__tests__/TextArea-test.js diff --git a/packages/react/src/components/TextArea/TextArea.js b/packages/react/src/components/TextArea/TextArea.js index 314e42adcd39..d17b0315d1bd 100644 --- a/packages/react/src/components/TextArea/TextArea.js +++ b/packages/react/src/components/TextArea/TextArea.js @@ -118,6 +118,7 @@ const TextArea = React.forwardRef(function TextArea( aria-invalid={invalid || null} aria-describedby={invalid ? errorId : null} disabled={other.disabled} + readOnly={other.readOnly} /> ); @@ -133,7 +134,9 @@ const TextArea = React.forwardRef(function TextArea( {counter}
{invalid && !isFluid && ( @@ -239,9 +242,13 @@ TextArea.propTypes = { placeholder: PropTypes.string, /** - * Specify the rows attribute for the `