Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/clean-ligers-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": minor
---

Deprecate width, minWidth and maxWidth props from TextInput
13 changes: 8 additions & 5 deletions packages/react/src/internal/components/TextInputWrapper.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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<string | number>
/** @deprecated Update `min-width` using CSS modules or style. */
minWidth?: string | number | ResponsiveValue<string | number>
/** @deprecated Update `max-width` using CSS modules or style. */
maxWidth?: string | number | ResponsiveValue<string | number>
} & SxProp

export type StyledWrapperProps = {
hasLeadingVisual?: boolean
Expand Down
Loading