GT2/Ejectable/node_modules/@react-navigation/bottom-tabs/lib/module/views/TabBarIcon.js.map

1 line
4.6 KiB
Plaintext
Raw Normal View History

2021-08-16 00:14:59 +00:00
{"version":3,"sources":["TabBarIcon.tsx"],"names":["React","View","StyleSheet","Badge","TabBarIcon","horizontal","badge","badgeStyle","activeOpacity","inactiveOpacity","activeTintColor","inactiveTintColor","renderIcon","style","size","styles","iconHorizontal","iconVertical","icon","opacity","focused","color","badgeHorizontal","badgeVertical","create","position","alignSelf","alignItems","justifyContent","height","width","minWidth","flex","marginTop","left","top"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,IADF,EAEEC,UAFF,QAMO,cANP;AAQA,OAAOC,KAAP,MAAkB,SAAlB;AAmBA,eAAe,SAASC,UAAT,CAAoB;AACjCC,EAAAA,UADiC;AAEjCC,EAAAA,KAFiC;AAGjCC,EAAAA,UAHiC;AAIjCC,EAAAA,aAJiC;AAKjCC,EAAAA,eALiC;AAMjCC,EAAAA,eANiC;AAOjCC,EAAAA,iBAPiC;AAQjCC,EAAAA,UARiC;AASjCC,EAAAA;AATiC,CAApB,EAUL;AACR,QAAMC,IAAI,GAAG,EAAb,CADQ,CAGR;AACA;;AACA,sBACE,oBAAC,IAAD;AACE,IAAA,KAAK,EAAE,CAACT,UAAU,GAAGU,MAAM,CAACC,cAAV,GAA2BD,MAAM,CAACE,YAA7C,EAA2DJ,KAA3D;AADT,kBAGE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAE,CAACE,MAAM,CAACG,IAAR,EAAc;AAAEC,MAAAA,OAAO,EAAEX;AAAX,KAAd;AAAb,KACGI,UAAU,CAAC;AACVQ,IAAAA,OAAO,EAAE,IADC;AAEVN,IAAAA,IAFU;AAGVO,IAAAA,KAAK,EAAEX;AAHG,GAAD,CADb,CAHF,eAUE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAE,CAACK,MAAM,CAACG,IAAR,EAAc;AAAEC,MAAAA,OAAO,EAAEV;AA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Style,\n} from 'react-native';\nimport type { Route } from '@react-navigation/native';\nimport Badge from './Badge';\n\ntype Props = {\n route: Route<string>;\n horizontal: boolean;\n badge?: string | number;\n badgeStyle?: StyleProp<TextStyle>;\n activeOpacity: number;\n inactiveOpacity: number;\n activeTintColor: string;\n inactiveTintColor: string;\n renderIcon: (props: {\n focused: boolean;\n color: string;\n size: number;\n }) => React.ReactNode;\n style: StyleProp<ViewStyle>;\n};\n\nexport default function TabBarIcon({\n horizontal,\n badge,\n badgeStyle,\n activeOpacity,\n inactiveOpacity,\n activeTintColor,\n inactiveTintColor,\n renderIcon,\n style,\n}: Props) {\n const size = 25;\n\n // We render the icon twice at the same position on top of each other:\n // active and inactive one, so we can fade between them.\n return (\n <View\n style={[horizontal ? styles.iconHorizontal : styles.iconVertical, style]}\n >\n <View style={[styles.icon, { opacity: activeOpacity }]}>\n {renderIcon({\n focused: true,\n size,\n color: activeTintColor,\n })}\n </View>\n <View style={[styles.icon, { opacity: inactiveOpacity }]}>\n {renderIcon({\n focused: false,\n size,\n color: inactiveTintColor,\n })}\n </View>\n <Badge\n visible={badge != null}\n style={[\n styles.badge,\n horizontal ? styles.badgeHorizontal : styles.badgeVertical,\n badgeStyle,\n ]}\n size={(size * 3) / 4}\n >\n {badge}\n </Badge>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n icon: {\n // We render the icon twice at the