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: use correct TS types for style prop #616

Merged
merged 1 commit into from
Aug 31, 2021

Conversation

vonovak
Copy link
Contributor

@vonovak vonovak commented Aug 31, 2021

Motivation

The motivation is to be able to pass styles to the bottom sheet components the same way as with other react native components, see eg. https://github.com/DefinitelyTyped/DefinitelyTyped/blob/ff070e46d5821d3a28beed3707386677231ce204/types/react-native/index.d.ts#L2919

current situation:

Screen Shot 2021-08-31 at 11 02 28

Screen Shot 2021-08-31 at 11 03 21

The second screenshot contains valid styles, but the TS typings currently do not accept them. This change makes it so that the second example is valid too.

also removed appearanceBehavior because it does not appear to be used anywhere. Actually, animatedFooterPosition should be passed in that place - it'd be good to include some static checks in the repo's pipeline it seems 🙂

@vonovak vonovak changed the title fix: types for styles fix: use correct TS types for style prop Aug 31, 2021
@gorhom gorhom merged commit 7fa1453 into gorhom:master Aug 31, 2021
@gorhom
Copy link
Owner

gorhom commented Aug 31, 2021

thanks @vonovak for spotting it, the dev screen used for experimenting new features and i did not fix it when updating footer component 🤦‍♂️

@vonovak vonovak deleted the fix/ts-typings branch August 31, 2021 18:58
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.

2 participants