Skip to content

Commit

Permalink
chore: show library version in drawer in example app (callstack#3644)
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitarNestorov committed Feb 6, 2023
1 parent a7eeb62 commit 84d9da2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ module.exports = function (api) {
{
extensions: ['.tsx', '.ts', '.js', '.json'],
alias: {
[`${pak.name}/package.json`]: path.join(
__dirname,
'..',
'package.json'
),
// For development, we want to alias the library to the source
[pak.name]: path.join(__dirname, '..', pak.source),
},
Expand Down
5 changes: 5 additions & 0 deletions example/src/DrawerItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ const DrawerItems = ({
* - available only for MD3
</Text>
)}
<Text variant="bodySmall" style={styles.annotation}>
React Native Paper Version{' '}
{require('react-native-paper/package.json').version}
</Text>
</>
)}
</DrawerContentScrollView>
Expand Down Expand Up @@ -257,6 +261,7 @@ const styles = StyleSheet.create({
},
annotation: {
marginHorizontal: 24,
marginVertical: 6,
},
});

Expand Down

0 comments on commit 84d9da2

Please sign in to comment.