Skip to content

Commit 60acad7

Browse files
committed
fixes typescript errors, removes 'sx' prop from TextInput
1 parent 19b0741 commit 60acad7

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.EditableTextInput {
2+
min-width: 120px;
3+
max-width: 180px;
4+
font-size: inherit;
5+
border: var(--borderWidth-thin) dashed var(--borderColor-muted);
6+
}
7+
8+
.EditableTextInput:focus {
9+
border: var(--borderWidth-thin) solid var(--borderColor-accent-emphasis);
10+
}

packages/react/src/Breadcrumbs/Breadcrumbs.dev.stories.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {useState} from 'react'
22
import Breadcrumbs from '.'
33
import TextInput from '../TextInput'
4+
import classes from './Breadcrumbs.dev.stories.module.css'
45

56
export default {
67
title: 'Components/Breadcrumbs/Dev',
@@ -146,15 +147,7 @@ export const WithEditableNameInput = () => (
146147
<TextInput
147148
defaultValue="Untitled Document"
148149
size="small"
149-
sx={{
150-
minWidth: '120px',
151-
maxWidth: '180px',
152-
fontSize: 'inherit',
153-
border: '1px dashed var(--borderColor-muted)',
154-
'&:focus': {
155-
border: '1px solid var(--borderColor-accent-emphasis)',
156-
},
157-
}}
150+
className={classes.EditableTextInput}
158151
aria-label="Edit document name"
159152
/>
160153
</Breadcrumbs.Item>

packages/react/src/TextInput/TextInput.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export type TextInputNonPassthroughProps = {
4646
| 'contrast'
4747
| 'disabled'
4848
| 'monospace'
49-
| 'sx'
5049
| 'width'
5150
| 'maxWidth'
5251
| 'minWidth'
@@ -75,7 +74,6 @@ const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
7574
loaderText = 'Loading',
7675
monospace,
7776
validationStatus,
78-
sx: sxProp,
7977
size: sizeProp,
8078
onFocus,
8179
onBlur,
@@ -137,7 +135,6 @@ const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
137135
contrast={contrast}
138136
disabled={disabled}
139137
monospace={monospace}
140-
sx={sxProp}
141138
size={sizeProp}
142139
width={widthProp}
143140
minWidth={minWidthProp}

packages/react/src/internal/components/TextInputWrapper.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, {type ComponentProps} from 'react'
22
import {type ResponsiveValue} from 'styled-system'
3-
import type {SxProp} from '../../sx'
43
import type {FormValidationStatus} from '../../utils/types/FormValidationStatus'
54
import {clsx} from 'clsx'
65

@@ -30,7 +29,7 @@ type StyledTextInputBaseWrapperProps = {
3029
minWidth?: string | number | ResponsiveValue<string | number>
3130
/** @deprecated Update `max-width` using CSS modules or style. */
3231
maxWidth?: string | number | ResponsiveValue<string | number>
33-
} & SxProp
32+
}
3433

3534
type StyledTextInputWrapperProps = {
3635
hasLeadingVisual?: boolean

0 commit comments

Comments
 (0)