Skip to content

Commit

Permalink
fix: native storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
akash3gtm committed Jan 9, 2025
1 parent 917a7f2 commit 5252bc4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 27 deletions.
27 changes: 1 addition & 26 deletions example/storybook-v7/App.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
import { StyleSheet, Text, View } from 'react-native';

import './global.css';
function App() {
return (
<View style={styles.container}>
<View className="bg-primary-500">
<Text>Open up App.tsx to start working on your app! 22</Text>
</View>
</View>
);
}

let AppEntryPoint = App;

// if (Constants.expoConfig?.extra?.storybookEnabled === "true") {
AppEntryPoint = require('./.ondevice').default;

// }

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
const AppEntryPoint = require('./.ondevice').default;

export default AppEntryPoint;
4 changes: 4 additions & 0 deletions example/storybook-v7/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ module.exports = function (api) {
__dirname,
'../../packages/unstyled/pin-input/src'
),
'@gluestack-ui/image-viewer': path.join(
__dirname,
'../../packages/unstyled/image-viewer/src'
),
'@gluestack-ui/toast': path.join(
__dirname,
'../../packages/unstyled/toast/src'
Expand Down
3 changes: 2 additions & 1 deletion example/storybook-v7/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"strict": true,
"baseUrl": ".",
"paths": {
"@gluestack-ui/pin-input": ["../../packages/unstyled/pin-input/src"]
"@gluestack-ui/pin-input": ["../../packages/unstyled/pin-input/src"],
"@gluestack-ui/image-viewer": ["../../packages/unstyled/image-viewer/src"]
}
}
}

0 comments on commit 5252bc4

Please sign in to comment.