Skip to content

Commit

Permalink
chore: update storybook native, add fonts, fix image references
Browse files Browse the repository at this point in the history
  • Loading branch information
tigranpetrossian committed Nov 7, 2024
1 parent 4a95358 commit 8e68d02
Show file tree
Hide file tree
Showing 5 changed files with 257 additions and 133 deletions.
8 changes: 4 additions & 4 deletions packages/ui/app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ export default ({ config }) => ({
},
version: '1.0.0',
orientation: 'portrait',
icon: './src/assets-native/icon.png',
icon: './src/assets-native/images/icon.png',
scheme: 'myapp',
userInterfaceStyle: 'automatic',
splash: {
image: './src/assets-native/splash.png',
image: './src/assets-native/images/splash.png',
resizeMode: 'contain',
backgroundColor: '#ffffff',
},
Expand All @@ -26,13 +26,13 @@ export default ({ config }) => ({
},
android: {
adaptiveIcon: {
foregroundImage: './src/assets-native/adaptive-icon.png',
foregroundImage: './src/assets-native/images/adaptive-icon.png',
backgroundColor: '#ffffff',
},
package: 'io.leather.mobilewallet',
},
web: {
favicon: './src/assets-native/favicon.png',
favicon: './src/assets-native/images/favicon.png',
},
plugins: ['expo-font'],
});
50 changes: 0 additions & 50 deletions packages/ui/app.json

This file was deleted.

3 changes: 2 additions & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.1",
"react-native-gesture-handler": "2.16.1",
"react-native-reanimated": "3.10.1",
"react-native-safe-area-context": "4.10.1",
"react-native-svg": "15.2.0",
Expand Down Expand Up @@ -88,7 +89,7 @@
"@storybook/blocks": "8.3.2",
"@storybook/manager-api": "8.3.2",
"@storybook/react": "8.3.2",
"@storybook/react-native": "7.6.20",
"@storybook/react-native": "8.3.10",
"@storybook/react-webpack5": "8.3.2",
"@storybook/test": "8.3.2",
"@storybook/theming": "8.3.2",
Expand Down
13 changes: 13 additions & 0 deletions packages/ui/src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
import { useColorScheme } from 'react-native';

import { ThemeProvider } from '@shopify/restyle';
import { useFonts } from 'expo-font';

import StorybookUIRoot from './.storybook-native';
import { generateTheme } from './theme-native';

function RootLayout() {
const colorScheme = useColorScheme();
const [loaded, error] = useFonts({
'FiraCode-Retina': require('./assets-native/fonts/FiraCode-Retina.otf'),
'FiraCode-Medium': require('./assets-native/fonts/FiraCode-Medium.otf'),
'ABCDiatype-Light': require('./assets-native/fonts/ABCDiatype-Light.otf'),
'ABCDiatype-Regular': require('./assets-native/fonts/ABCDiatype-Regular.otf'),
'ABCDiatype-Medium': require('./assets-native/fonts/ABCDiatype-Medium.otf'),
'MarchePro-Super': require('./assets-native/fonts/MarchePro-Super.otf'),
});

if (!loaded || error) {
return null;
}

return (
<ThemeProvider theme={generateTheme(colorScheme)}>
Expand Down
Loading

0 comments on commit 8e68d02

Please sign in to comment.