Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add contentStyle to TextInput #3509

Merged
merged 10 commits into from
Dec 19, 2022
Merged

Conversation

guilherme-ferraz1
Copy link
Contributor

@guilherme-ferraz1 guilherme-ferraz1 commented Dec 7, 2022

Summary

Adds contentStyle prop to TextInput as requested in #3434
This prop allows to pass style props directly to the input itself, not the container.

Test plan

The tests and examples are already updated.
Tested on both IOS and Android with StyleProp<ViewStyle> props like paddingLeft, backgroundColor etc.

Custom style input example:

contentStyle={{ paddingLeft: 50 }}

Captura de Tela 2022-12-06 às 23 06 18

@callstack-bot
Copy link

callstack-bot commented Dec 7, 2022

Hey @guilherme-ferraz1, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

src/components/TextInput/TextInput.tsx Outdated Show resolved Hide resolved
src/components/TextInput/TextInput.tsx Outdated Show resolved Hide resolved
src/components/TextInput/TextInput.tsx Outdated Show resolved Hide resolved
src/components/TextInput/TextInput.tsx Outdated Show resolved Hide resolved
@gmferraz
Copy link

@lukewalczak unit test added, prop name changed and minor issues fixed

@lukewalczak
Copy link
Member

Hey @gmferraz, I've analyzed your PR one more time and have two requests, please:

  • resolve conflict
  • rename prop to contentStyle - it's more appropriate than containerStyle proposed previously.

I would like to do the release tomorrow, so please handle it if possible 🙏🏽

@gmferraz
Copy link

@lukewalczak done :)

src/components/TextInput/TextInputFlat.tsx Outdated Show resolved Hide resolved
src/components/TextInput/TextInputFlat.tsx Outdated Show resolved Hide resolved
src/components/TextInput/TextInputFlat.tsx Outdated Show resolved Hide resolved
src/components/TextInput/TextInputFlat.tsx Outdated Show resolved Hide resolved
src/components/TextInput/TextInputFlat.tsx Outdated Show resolved Hide resolved
@lukewalczak lukewalczak merged commit 0fca19f into callstack:main Dec 19, 2022
@lukewalczak lukewalczak changed the title feat: add customInputStyle to TextInput feat: add contentStyle to TextInput Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants