Skip to content

fix: fixed backgroundColor of textinput label #3020#3038

Merged
lukewalczak merged 2 commits intocallstack:mainfrom
Svarto:main
Jan 14, 2022
Merged

fix: fixed backgroundColor of textinput label #3020#3038
lukewalczak merged 2 commits intocallstack:mainfrom
Svarto:main

Conversation

@Svarto
Copy link
Copy Markdown
Contributor

@Svarto Svarto commented Jan 13, 2022

Summary

This PR fixes issue #3020 , to ensure that the label in TextinputFlat aligns with the backgroundColor of the TextInput AND to not show the label if there is no label specified for the textInput.

Test plan

See issue, @lukewalczak ran tests and advised on this PR.

@Svarto Svarto changed the title fixed backgroundColor of textinput label #3020 fix: fixed backgroundColor of textinput label #3020 Jan 13, 2022
@callstack-bot
Copy link
Copy Markdown

callstack-bot commented Jan 13, 2022

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

dense ? styles.densePatchContainer : styles.patchContainer,
{
backgroundColor: containerStyle.backgroundColor,
backgroundColor: viewStyle.backgroundColor || containerStyle.backgroundColor,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Svarto please fix the lint issue ✌🏽

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

@victoriomolina victoriomolina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code cause might cause exceptions/issues. It should be:

-> {!isAndroid && multiline && Boolean(label) &&

-> backgroundColor: viewStyle.backgroundColor ?? containerStyle.backgroundColor,

@lukewalczak lukewalczak merged commit e03c07f into callstack:main Jan 14, 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