react-native-dropdownalert icon indicating copy to clipboard operation
react-native-dropdownalert copied to clipboard

Add support for bottom position

Open timnlupo opened this issue 3 years ago • 4 comments

Hi all! I'm thinking about adding support for a position prop with options top or bottom. This would allow users to specify whether they want the notification to drop down from the top or pop up from the bottom. Similar to the functionality in this repo.

Please lmk what you think before I invest the time in building it out. Thanks.

timnlupo avatar Oct 28 '20 21:10 timnlupo

Yes. I want that too.

intechsol20 avatar Oct 29 '20 04:10 intechsol20

A position prop would be a nice convenient way. This though is currently supported by setting startDelta and endDelta to the window height (useWindowDimensions().height).

testshallpass avatar Dec 17 '20 02:12 testshallpass

I just tried this, you actually need to set

startDelta={useWindowDimensions().height}
endDelta={useWindowDimensions().height - height} // height is the height of the alert

Since height is saved in the DropdownAlert's state, I think it makes sense to add a position prop to be able to easily toggle it. Otherwise, a user has to add an onLayout to a view surrounding the DropdownAlert (which gets messy).

Going to work on this (should be pretty straightforward) and will update here.

timnlupo avatar Dec 17 '20 22:12 timnlupo

Are there any updates to this?

shawnFallon avatar Jun 03 '21 04:06 shawnFallon

I have simplified to a single animation flow from the top in latest release. That being said, I am open to support the inverse. I will take a look at the feasibility soon.

testshallpass avatar Jul 31 '23 22:07 testshallpass

Update: implemented in PR #302

testshallpass avatar Aug 04 '23 12:08 testshallpass

Completed in v5.1.0

testshallpass avatar Aug 08 '23 13:08 testshallpass