From 1b454cd4cac1e3f534fd6cb64d945e58c579a2f3 Mon Sep 17 00:00:00 2001 From: CleverLemming1337 <119337770+CleverLemming1337@users.noreply.github.com> Date: Thu, 19 Sep 2024 18:05:28 +0200 Subject: [PATCH 1/4] Update TextInput.tsx Move contrast to deprecated props --- packages/react/src/TextInput/TextInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/TextInput/TextInput.tsx b/packages/react/src/TextInput/TextInput.tsx index e2d2acd0736..80375622e53 100644 --- a/packages/react/src/TextInput/TextInput.tsx +++ b/packages/react/src/TextInput/TextInput.tsx @@ -63,7 +63,6 @@ const TextInput = React.forwardRef( trailingAction, block, className, - contrast, disabled, loading, loaderPosition = 'auto', @@ -78,6 +77,7 @@ const TextInput = React.forwardRef( minWidth: minWidthProp, maxWidth: maxWidthProp, variant: variantProp, + contrast, // end deprecated props type = 'text', required, From 7c4daae0f8cddc24dd59727191951f6ae098869f Mon Sep 17 00:00:00 2001 From: CleverLemming1337 <119337770+CleverLemming1337@users.noreply.github.com> Date: Thu, 19 Sep 2024 18:06:53 +0200 Subject: [PATCH 2/4] Mark `contrast` as deprecated in TextInput.docs.json --- packages/react/src/TextInput/TextInput.docs.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react/src/TextInput/TextInput.docs.json b/packages/react/src/TextInput/TextInput.docs.json index 69d9f71bfd9..5a5ca1aa732 100644 --- a/packages/react/src/TextInput/TextInput.docs.json +++ b/packages/react/src/TextInput/TextInput.docs.json @@ -22,6 +22,7 @@ "name": "contrast", "type": "boolean", "defaultValue": "false", + "deprecated": true, "description": "Changes background color to a higher contrast color" }, { From 8180f86132ccfdb9bf7f939791743bb529e41320 Mon Sep 17 00:00:00 2001 From: CleverLemming1337 <119337770+CleverLemming1337@users.noreply.github.com> Date: Thu, 19 Sep 2024 18:17:05 +0200 Subject: [PATCH 3/4] Deprecate `contrast` in TextInputWithTokens --- packages/react/src/TextInputWithTokens/TextInputWithTokens.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/TextInputWithTokens/TextInputWithTokens.tsx b/packages/react/src/TextInputWithTokens/TextInputWithTokens.tsx index e2c97ac77f1..a69854cd1d4 100644 --- a/packages/react/src/TextInputWithTokens/TextInputWithTokens.tsx +++ b/packages/react/src/TextInputWithTokens/TextInputWithTokens.tsx @@ -75,7 +75,7 @@ function TextInputWithTokensInnerComponent Date: Thu, 19 Sep 2024 16:41:10 +0000 Subject: [PATCH 4/4] Add changeset --- .changeset/slow-boats-roll.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/slow-boats-roll.md diff --git a/.changeset/slow-boats-roll.md b/.changeset/slow-boats-roll.md new file mode 100644 index 00000000000..13ce38ed521 --- /dev/null +++ b/.changeset/slow-boats-roll.md @@ -0,0 +1,5 @@ +--- +'@primer/react': minor +--- + +Deprecate `contrast` prop of TextInput and TextInputWithTokens