Closed intergalacticspacehighway closed 2 years ago
I think we might need a better name for iOSIconName or add androidIconName prop probably. Maybe just keep it as iconName?
They probably need to be different, since iOS uses SF Symbols. I assume the names don't match Android
Left some small comments. I think we probably keep the icon names separate, since I don't think they'll reliably overlap. alternatively it could be iconName={{ ios: '', android: '' }}
, not sure. Inline is probably better
iconName={{ ios: '', android: '' }}.
Yeah no objects, doesn't work well with memoization.
user can use it as iconName={Platform.select({})} so would be inline, no strong opinions so can add androidIconName
. Let me know wyt
let’s keep it inline as different props. better to not have to import Platform
good to go?
I assume you went off the latest iOS file and didn't just copy the showtime code, right? because i've made changes since you guys forked it into showtime
yeah, looks good to me. Yes, everything is the same as the latest iOS file, the only change is in the way we pass props to native MenuView.
i’ll push tomorrow
Why?
Adds native menu on android. The native menu is better for accessibility and has a good default animation.
How?
Uses @react-native-menu/menu library as a peer dependency.
Differences between iOS and Android menu
Android menu doesn't have a Group support (
displayInline
prop in iOS menu). So, flattened the group here.Discuss
I think we might need a better name for
iOSIconName
or addandroidIconName
prop probably. Maybe just keep it asiconName
?https://user-images.githubusercontent.com/23293248/173624549-55a3754e-19ce-495b-adc0-d18866917d0a.mov