Skip to content

Commit 84d9da2

Browse files
chore: show library version in drawer in example app (#3644)
1 parent a7eeb62 commit 84d9da2

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

example/babel.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ module.exports = function (api) {
1313
{
1414
extensions: ['.tsx', '.ts', '.js', '.json'],
1515
alias: {
16+
[`${pak.name}/package.json`]: path.join(
17+
__dirname,
18+
'..',
19+
'package.json'
20+
),
1621
// For development, we want to alias the library to the source
1722
[pak.name]: path.join(__dirname, '..', pak.source),
1823
},

example/src/DrawerItems.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ const DrawerItems = ({
228228
* - available only for MD3
229229
</Text>
230230
)}
231+
<Text variant="bodySmall" style={styles.annotation}>
232+
React Native Paper Version{' '}
233+
{require('react-native-paper/package.json').version}
234+
</Text>
231235
</>
232236
)}
233237
</DrawerContentScrollView>
@@ -257,6 +261,7 @@ const styles = StyleSheet.create({
257261
},
258262
annotation: {
259263
marginHorizontal: 24,
264+
marginVertical: 6,
260265
},
261266
});
262267

0 commit comments

Comments
 (0)