1+ /* eslint-disable react-native/no-inline-styles */
2+ /* eslint-disable react-hooks/exhaustive-deps */
3+ import * as React from 'react' ;
4+ import { StyleSheet } from 'react-native' ;
5+
6+ import * as LibraryPackageConfig from '../../../package.json' ;
7+ import * as ExamplePackageConfig from '../../package.json' ;
8+ import { IS_USING_NEW_ARCH } from '../constants/SharedEnv' ;
9+
10+ import { ExampleItemCard , ObjectPropertyDisplay , Colors } from 'react-native-ios-utilities' ;
11+ import type { ExampleItemProps } from '../examples/SharedExampleTypes' ;
12+
13+
14+ export function AppMetadataCard ( props : ExampleItemProps ) {
15+
16+ return (
17+ < ExampleItemCard
18+ style = { props . style }
19+ index = { props . index }
20+ title = { 'App Metadata' }
21+ >
22+ < ObjectPropertyDisplay
23+ recursiveStyle = { styles . debugDisplayInner }
24+ object = { {
25+ libraryName : LibraryPackageConfig . name ,
26+ libraryVersion : LibraryPackageConfig . version ,
27+ IS_USING_NEW_ARCH ,
28+ exampleDependencies : ExamplePackageConfig . dependencies ,
29+ } }
30+ />
31+ </ ExampleItemCard >
32+ ) ;
33+ } ;
34+
35+ const styles = StyleSheet . create ( {
36+ detachedView : {
37+ } ,
38+ detachedContentContainer : {
39+ flex : 1 ,
40+ alignItems : 'center' ,
41+ justifyContent : 'center' ,
42+ } ,
43+ detachedContentContainerDetached : {
44+ } ,
45+ counterContainer : {
46+ alignItems : 'center' ,
47+ justifyContent : 'center' ,
48+ backgroundColor : 'rgba(255,255,255,0.3)' ,
49+ borderRadius : 10 ,
50+ marginTop : 12 ,
51+ paddingHorizontal : 15 ,
52+ paddingVertical : 15
53+ } ,
54+ counterContainerLarge : {
55+ flex : 1 ,
56+ alignSelf : 'stretch' ,
57+ marginHorizontal : 24 ,
58+ marginBottom : 32 ,
59+ marginTop : 52 ,
60+ borderRadius : 40 ,
61+ } ,
62+ counterLabel : {
63+ fontSize : 24 ,
64+ fontWeight : '900' ,
65+ color : 'rgba(0,0,0,0.5)' ,
66+ } ,
67+ counterLabelLarge : {
68+ fontSize : 64 ,
69+ } ,
70+ counterSubtitleLabel : {
71+ fontSize : 16 ,
72+ color : 'rgba(0,0,0,0.7)' ,
73+ fontWeight : '400' ,
74+ } ,
75+ counterSubtitleLabelAlt : {
76+ fontSize : 18 ,
77+ marginVertical : 4 ,
78+ fontWeight : '600' ,
79+ color : 'rgba(0,0,0,0.5)' ,
80+ } ,
81+ counterSubtitleLabelLarge : {
82+ fontSize : 32 ,
83+ } ,
84+ debugDisplayInner : {
85+ backgroundColor : `${ Colors . PURPLE [ 200 ] } 99` ,
86+ } ,
87+ } ) ;
0 commit comments