Skip to content

Conversation

jaulz
Copy link
Collaborator

@jaulz jaulz commented Apr 26, 2020

Motivation

The PR adds a new property to the Snackbar in order to overwrite these styles:

wrapper: {
position: 'absolute',
bottom: 0,
width: '100%',
},

Test plan

n/a

@callstack-bot
Copy link

callstack-bot commented Apr 26, 2020

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

@github-actions
Copy link

The mobile version of example app from this branch is ready! You can see it here

.

@jaulz jaulz requested a review from Trancever April 26, 2020 17:55
@Trancever
Copy link
Contributor

@jaulz What's your use case?

@jaulz
Copy link
Collaborator Author

jaulz commented Apr 27, 2020

@Trancever I need to calculate the height of the Snackbar and thus it needs to be positioned relatively.

@Trancever
Copy link
Contributor

@jaulz Can't you just pass onLayout? It's passed to the underlying Surface component so It should return the correct dimensions and position.

@jaulz
Copy link
Collaborator Author

jaulz commented Apr 27, 2020

@Trancever unfortunately not as I use a custom container that calculates the layout and triggers some other effects so I think this is the only possibility for me...

@Trancever Trancever merged commit 453b730 into master Apr 30, 2020
@Trancever Trancever deleted the jaulz/fix-add-snackbar-wrapperStyle branch April 30, 2020 07:50
Trancever pushed a commit that referenced this pull request Apr 30, 2020
* fix: add wrapperStyle * style: fix lint * style: fix lint * test: update snapshots
marchenk0va pushed a commit to marchenk0va/react-native-paper that referenced this pull request Jun 2, 2020
* fix: add wrapperStyle * style: fix lint * style: fix lint * test: update snapshots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants