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 diff --git a/packages/react/src/TextInput/TextInput.docs.json b/packages/react/src/TextInput/TextInput.docs.json index 24849d697d1..2ca0c4edb3a 100644 --- a/packages/react/src/TextInput/TextInput.docs.json +++ b/packages/react/src/TextInput/TextInput.docs.json @@ -77,6 +77,7 @@ "name": "contrast", "type": "boolean", "defaultValue": "false", + "deprecated": true, "description": "Changes background color to a higher contrast color" }, { diff --git a/packages/react/src/TextInput/TextInput.tsx b/packages/react/src/TextInput/TextInput.tsx index e272f04887f..ca4ec513ef3 100644 --- a/packages/react/src/TextInput/TextInput.tsx +++ b/packages/react/src/TextInput/TextInput.tsx @@ -66,7 +66,6 @@ const TextInput = React.forwardRef( trailingAction, block, className, - contrast, disabled, loading, loaderPosition = 'auto', @@ -82,6 +81,7 @@ const TextInput = React.forwardRef( minWidth: minWidthProp, maxWidth: maxWidthProp, variant: variantProp, + contrast, // end deprecated props type = 'text', required, diff --git a/packages/react/src/TextInputWithTokens/TextInputWithTokens.tsx b/packages/react/src/TextInputWithTokens/TextInputWithTokens.tsx index 54df57ca385..d93f780ee98 100644 --- a/packages/react/src/TextInputWithTokens/TextInputWithTokens.tsx +++ b/packages/react/src/TextInputWithTokens/TextInputWithTokens.tsx @@ -79,7 +79,7 @@ function TextInputWithTokensInnerComponent