Skip to content

Commit 80fb12f

Browse files
committed
chore: move cssInterop function to ui folder
1 parent 36c18c1 commit 80fb12f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/app/_layout.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ export { ErrorBoundary } from 'expo-router';
1616
// Import global CSS file
1717
import '../../global.css';
1818

19-
import { cssInterop } from 'nativewind';
20-
import Svg from 'react-native-svg';
21-
2219
export const unstable_settings = {
2320
initialRouteName: '(app)',
2421
};
@@ -28,13 +25,6 @@ loadSelectedTheme();
2825
// Prevent the splash screen from auto-hiding before asset loading is complete.
2926
SplashScreen.preventAutoHideAsync();
3027

31-
//Apply cssInterop to Svg to resolve className string into style
32-
cssInterop(Svg, {
33-
className: {
34-
target: 'style',
35-
},
36-
});
37-
3828
export default function RootLayout() {
3929
const navigationRef = useNavigationContainerRef();
4030
useReactNavigationDevTools(navigationRef);

src/ui/index.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import { cssInterop } from 'nativewind';
2+
import Svg from 'react-native-svg';
3+
14
export * from './button';
25
export * from './checkbox';
36
export { default as colors } from './colors';
@@ -20,3 +23,10 @@ export {
2023
View,
2124
} from 'react-native';
2225
export { SafeAreaView } from 'react-native-safe-area-context';
26+
27+
//Apply cssInterop to Svg to resolve className string into style
28+
cssInterop(Svg, {
29+
className: {
30+
target: 'style',
31+
},
32+
});

0 commit comments

Comments
 (0)