-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
28/7, navigasi yang masih pr, kenapa menu gabisa muncul animasi modal.
- Loading branch information
1 parent
4cc6a25
commit 4a3a01f
Showing
12 changed files
with
644 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
import Svg, {Path, SvgProps} from 'react-native-svg'; | ||
|
||
// type Props = SvgProps & { | ||
// color?: string, | ||
// }; | ||
|
||
export const TabBg = ({color = 'yellow', ...props}) => { | ||
return ( | ||
<Svg width={75} height={61} viewBox="0 0 75 61" {...props}> | ||
<Path | ||
d="M75.2 0v61H0V0c4.1 0 7.4 3.1 7.9 7.1C10 21.7 22.5 33 37.7 33c15.2 0 27.7-11.3 29.7-25.9.5-4 3.9-7.1 7.9-7.1h-.1z" | ||
fill={color} | ||
/> | ||
</Svg> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<BottomTab.Navigator | ||
// initialRouteName="Home" | ||
mode="modal" | ||
screenOptions={{ | ||
presentation: 'modal', | ||
|
||
headerShown: false, | ||
// headerMode: 'screen', | ||
animationEnabled: false, | ||
tabBarShowIcon: true, | ||
tabBarShowLabel: true, | ||
tabBarInactiveTintColor: BaseColor.corn30, | ||
tabBarActiveTintColor: BaseColor.corn70, | ||
tabBarStyle: { | ||
//cek | ||
position: 'absolute', | ||
|
||
elevation: 0, | ||
backgroundColor: BaseColor.corn10, | ||
borderRadius: 15, | ||
height: 60, | ||
...styles.shadow, | ||
}, | ||
tabBarLabelStyle: { | ||
fontSize: 11, | ||
|
||
paddingBottom: 8, | ||
}, | ||
tabBarItemStyle: { | ||
borderTopWidth: 0, | ||
|
||
// backgroundColor: '#FFFFFF', | ||
// backgroundColor: 'red', | ||
// backgroundColor: 'transparent', | ||
|
||
// elevation: 30, | ||
}, | ||
}} | ||
options={{modalPresentationStyle: 'fullScreen'}}> | ||
{Object.keys(tabScreens).map((name, index) => { | ||
const {options, component} = tabScreens[name]; | ||
console.log('name tab', name); | ||
console.log('index tab', index); | ||
return name == 'CustomModal' ? ( | ||
<BottomTab.Screen | ||
key={index} | ||
name={name} | ||
component={component} | ||
// component={CustomModal} | ||
// listeners={({navigation}) => ({ | ||
// tabPress: event => { | ||
// event.preventDefault(); | ||
// navigation.navigate('CustomModal'); | ||
// }, | ||
// })} | ||
listeners={({navigation, route}) => ({ | ||
tabPress: e => { | ||
console.log('ini yg diklik', e), | ||
// Prevent default action | ||
e.preventDefault(); | ||
|
||
// Do something with the `navigation` object | ||
navigation.navigate('CustomModal'); | ||
}, | ||
})} | ||
options={{ | ||
tabBarIconStyle: {paddingVertical: 0, marginVertical: 0}, | ||
...options, | ||
title: t(options.title), | ||
animationEnabled: true, | ||
}} | ||
/> | ||
) : ( | ||
<BottomTab.Screen | ||
key={index} | ||
name={name} | ||
component={component} | ||
options={{ | ||
tabBarIconStyle: {paddingVertical: 0, marginVertical: 0}, | ||
...options, | ||
title: t(options.title), | ||
}} | ||
/> | ||
); | ||
})} | ||
{/* </BottomTab.Group> */} | ||
{/* <BottomTab.Group screenOptions={{presentation: 'modal'}}> | ||
<BottomTab.Screen name="MyModal" component={CustomModal} /> | ||
</BottomTab.Group> */} | ||
</BottomTab.Navigator>; |
Oops, something went wrong.