File tree Expand file tree Collapse file tree 2 files changed +5
-20
lines changed
Expand file tree Collapse file tree 2 files changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ export default function App() {
100100 < StatusBar barStyle = "dark-content" />
101101 < View style = { [ styles . container ] } >
102102 < MapboxTurnByTurnNavigationView
103+ style = { styles . mapboxView }
103104 hybridRef = { { f : ( hRef ) => setHybridRef ( hRef ) } }
104105 origin = { {
105106 longitude : 5.058566 ,
@@ -119,4 +120,7 @@ const styles = StyleSheet.create({
119120 container : {
120121 flex : 1 ,
121122 } ,
123+ mapboxView : {
124+ flex : 1 ,
125+ } ,
122126} ) ;
Original file line number Diff line number Diff line change 1- import type { ComponentProps } from 'react' ;
2-
31const MapboxTurnByTurnNavigationConfig = require ( '../nitrogen/generated/shared/json/MapboxTurnByTurnNavigationConfig.json' ) ;
42import type {
53 MapboxTurnByTurnNavigationMethods ,
@@ -8,26 +6,9 @@ import type {
86
97export * from './MapboxTurnByTurnNavigation.nitro' ;
108
11- import { StyleSheet , View } from 'react-native' ;
129import { getHostComponent } from 'react-native-nitro-modules' ;
1310
14- export const NativeView = getHostComponent <
11+ export const MapboxTurnByTurnNavigationView = getHostComponent <
1512 MapboxTurnByTurnNavigationProps ,
1613 MapboxTurnByTurnNavigationMethods
1714> ( 'MapboxTurnByTurnNavigation' , ( ) => MapboxTurnByTurnNavigationConfig ) ;
18-
19- export const MapboxTurnByTurnNavigationView = (
20- props : ComponentProps < typeof NativeView >
21- ) => {
22- return (
23- < View style = { [ styles . container , props . style ] } >
24- < NativeView { ...props } style = { styles . container } />
25- </ View >
26- ) ;
27- } ;
28-
29- const styles = StyleSheet . create ( {
30- container : {
31- flex : 1 ,
32- } ,
33- } ) ;
You can’t perform that action at this time.
0 commit comments