Skip to content

Commit 1ea1878

Browse files
authored
Revert "feat(TextInput): Update TextInput to use data attributes for styling …"
This reverts commit 706d272.
1 parent 64802f1 commit 1ea1878

File tree

8 files changed

+2784
-9273
lines changed

8 files changed

+2784
-9273
lines changed

.changeset/real-fans-tap.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/react/src/TextInputWithTokens/TextInputWithTokens.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Token from '../Token/Token'
1313
import type {TokenSizeKeys} from '../Token/TokenBase'
1414

1515
import type {TextInputSizes} from '../internal/components/TextInputWrapper'
16-
import TextInputWrapper from '../internal/components/TextInputWrapper'
16+
import TextInputWrapper, {textInputHorizPadding} from '../internal/components/TextInputWrapper'
1717
import UnstyledTextInput from '../internal/components/UnstyledTextInput'
1818
import TextInputInnerVisualSlot from '../internal/components/TextInputInnerVisualSlot'
1919

@@ -266,8 +266,8 @@ function TextInputWithTokensInnerComponent<TokenComponentType extends AnyReactCo
266266
variant={variantProp} // deprecated. use `size` prop instead
267267
onClick={focusInput}
268268
sx={{
269-
paddingLeft: '12px',
270-
py: `calc(12px / 2)`,
269+
paddingLeft: textInputHorizPadding,
270+
py: `calc(${textInputHorizPadding} / 2)`,
271271
...(block
272272
? {
273273
display: 'flex',

packages/react/src/__tests__/Textarea.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ describe('Textarea', () => {
8484
width: '100%',
8585
display: 'flex',
8686
}
87-
const defaultStyles = renderStyles(<Textarea />)
88-
const blockStyles = renderStyles(<Textarea block />)
87+
const defaultStyles = renderStyles(<Textarea block />)
88+
const blockStyles = renderStyles(<Textarea />)
8989

90-
expect(defaultStyles).not.toEqual(expect.objectContaining(expectedStyles))
91-
expect(blockStyles).toEqual(expect.objectContaining(expectedStyles))
90+
expect(defaultStyles).toEqual(expect.objectContaining(expectedStyles))
91+
expect(blockStyles).not.toEqual(expect.objectContaining(expectedStyles))
9292
})
9393

9494
it('renders default resize values correctly', () => {

0 commit comments

Comments
 (0)