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

Fix style prop accepts function in native components for v5 #3389

Conversation

tkow
Copy link

@tkow tkow commented Jan 26, 2021

This PR for v5 branch of style prop bug fix already v5 Pressable released. More detail #3388.
Review in the way it says. Only difference is to checkout fix/3384_style_function_prop_for_v5 in submodule.

@tkow tkow marked this pull request as ready for review January 26, 2021 21:59
@tkow tkow force-pushed the fix/3384_style_function_prop_for_v5 branch from 18c11ba to 984b2bf Compare January 26, 2021 22:02
@RBrNx
Copy link

RBrNx commented Apr 7, 2021

Would love to see this get merged as soon as possible as it's quite an annoying issue with what seems to be a fairly simple fix 😅

@probablyup apologies for pinging you but is it possible to get this merged and released into v5? 🙏

EDIT: Although I suppose it might be nicer if we could somehow access the pressed state in the same way we already access props: background-color: ${({ pressed }) => pressed ? 'blue' : 'red'}, but I'm not sure if that's realistically possible?

@tkow
Copy link
Author

tkow commented Apr 12, 2021

@probablyup

If you're unfamiliar with React Native and have trouble to maintenance the related codebase, would you mind inviting me maintainer? I'm familiar with it so, maybe help you for that.

@quantizor
Copy link
Contributor

quantizor commented Apr 14, 2021

@tkow can you point me to where in the react-native docs the style prop accepts a function? I looked but couldn't find anything consistent. I'd rather not introduce prop patterns that require specific knowledge that something is a styled-component where possible.

Nevermind found it. Code looks good, could you add a changelog entry and I'll merge?

@tkow tkow force-pushed the fix/3384_style_function_prop_for_v5 branch from fd06f6a to 1fbfc4f Compare April 14, 2021 03:18
@tkow
Copy link
Author

tkow commented Apr 14, 2021

@probablyup Thank you for a reply. I did it.

@cam-shaw
Copy link

cam-shaw commented May 5, 2021

@probablyup Any chance we can get this merged in?

@quantizor quantizor merged commit b0a8041 into styled-components:legacy-v5 May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants