Skip to content

Commit

Permalink
Revert "feat(TextInput): Update TextInput to use data attributes for …
Browse files Browse the repository at this point in the history
…styling …" (#5256)

This reverts commit 706d272.
  • Loading branch information
hussam-i-am authored Nov 8, 2024
1 parent 64802f1 commit c424c36
Show file tree
Hide file tree
Showing 8 changed files with 2,784 additions and 9,273 deletions.
5 changes: 0 additions & 5 deletions .changeset/real-fans-tap.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Token from '../Token/Token'
import type {TokenSizeKeys} from '../Token/TokenBase'

import type {TextInputSizes} from '../internal/components/TextInputWrapper'
import TextInputWrapper from '../internal/components/TextInputWrapper'
import TextInputWrapper, {textInputHorizPadding} from '../internal/components/TextInputWrapper'
import UnstyledTextInput from '../internal/components/UnstyledTextInput'
import TextInputInnerVisualSlot from '../internal/components/TextInputInnerVisualSlot'

Expand Down Expand Up @@ -266,8 +266,8 @@ function TextInputWithTokensInnerComponent<TokenComponentType extends AnyReactCo
variant={variantProp} // deprecated. use `size` prop instead
onClick={focusInput}
sx={{
paddingLeft: '12px',
py: `calc(12px / 2)`,
paddingLeft: textInputHorizPadding,
py: `calc(${textInputHorizPadding} / 2)`,
...(block
? {
display: 'flex',
Expand Down
8 changes: 4 additions & 4 deletions packages/react/src/__tests__/Textarea.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ describe('Textarea', () => {
width: '100%',
display: 'flex',
}
const defaultStyles = renderStyles(<Textarea />)
const blockStyles = renderStyles(<Textarea block />)
const defaultStyles = renderStyles(<Textarea block />)
const blockStyles = renderStyles(<Textarea />)

expect(defaultStyles).not.toEqual(expect.objectContaining(expectedStyles))
expect(blockStyles).toEqual(expect.objectContaining(expectedStyles))
expect(defaultStyles).toEqual(expect.objectContaining(expectedStyles))
expect(blockStyles).not.toEqual(expect.objectContaining(expectedStyles))
})

it('renders default resize values correctly', () => {
Expand Down
Loading

0 comments on commit c424c36

Please sign in to comment.