diff --git a/.changeset/clean-ligers-approve.md b/.changeset/clean-ligers-approve.md new file mode 100644 index 00000000000..dbabb00e1f1 --- /dev/null +++ b/.changeset/clean-ligers-approve.md @@ -0,0 +1,5 @@ +--- +"@primer/react": minor +--- + +Deprecate width, minWidth and maxWidth props from TextInput diff --git a/packages/react/src/internal/components/TextInputWrapper.tsx b/packages/react/src/internal/components/TextInputWrapper.tsx index 072d17605cf..146c1c637b3 100644 --- a/packages/react/src/internal/components/TextInputWrapper.tsx +++ b/packages/react/src/internal/components/TextInputWrapper.tsx @@ -1,5 +1,5 @@ import styled, {css} from 'styled-components' -import type {MaxWidthProps, MinWidthProps, WidthProps} from 'styled-system' +import type {ResponsiveValue} from 'styled-system' import {maxWidth, minWidth, variant, width} from 'styled-system' import {get} from '../../constants' import type {SxProp} from '../../sx' @@ -56,10 +56,13 @@ export type StyledBaseWrapperProps = { isInputFocused?: boolean monospace?: boolean validationStatus?: FormValidationStatus -} & WidthProps & - MinWidthProps & - MaxWidthProps & - SxProp + /** @deprecated Update `width` using CSS modules or style. */ + width?: string | number | ResponsiveValue + /** @deprecated Update `min-width` using CSS modules or style. */ + minWidth?: string | number | ResponsiveValue + /** @deprecated Update `max-width` using CSS modules or style. */ + maxWidth?: string | number | ResponsiveValue +} & SxProp export type StyledWrapperProps = { hasLeadingVisual?: boolean