@umituz/react-native-settings 4.20.56 → 4.20.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +145 -3
- package/package.json +1 -2
- package/src/application/README.md +322 -0
- package/src/domains/about/README.md +452 -0
- package/src/domains/about/presentation/hooks/README.md +350 -0
- package/src/domains/appearance/README.md +596 -0
- package/src/domains/appearance/hooks/README.md +366 -0
- package/src/domains/appearance/infrastructure/services/README.md +455 -0
- package/src/domains/cloud-sync/README.md +451 -0
- package/src/domains/cloud-sync/presentation/components/README.md +493 -0
- package/src/domains/dev/README.md +477 -0
- package/src/domains/disclaimer/README.md +421 -0
- package/src/domains/disclaimer/presentation/components/README.md +394 -0
- package/src/domains/faqs/README.md +586 -0
- package/src/domains/feedback/README.md +565 -0
- package/src/domains/feedback/presentation/hooks/README.md +428 -0
- package/src/domains/legal/README.md +549 -0
- package/src/domains/rating/README.md +452 -0
- package/src/domains/rating/presentation/components/README.md +475 -0
- package/src/domains/video-tutorials/README.md +482 -0
- package/src/domains/video-tutorials/presentation/components/README.md +433 -0
- package/src/infrastructure/README.md +509 -0
- package/src/infrastructure/repositories/README.md +475 -0
- package/src/infrastructure/services/README.md +510 -0
- package/src/presentation/components/README.md +482 -0
- package/src/presentation/components/SettingsErrorBoundary/README.md +461 -0
- package/src/presentation/components/SettingsFooter/README.md +446 -0
- package/src/presentation/components/SettingsItemCard/README.md +457 -0
- package/src/presentation/components/SettingsSection/README.md +421 -0
- package/src/presentation/hooks/README.md +413 -0
- package/src/presentation/hooks/mutations/README.md +430 -0
- package/src/presentation/hooks/queries/README.md +441 -0
- package/src/presentation/navigation/README.md +532 -0
- package/src/presentation/navigation/components/README.md +330 -0
- package/src/presentation/navigation/hooks/README.md +399 -0
- package/src/presentation/navigation/utils/README.md +442 -0
- package/src/presentation/screens/README.md +525 -0
- package/src/presentation/screens/components/SettingsContent/README.md +404 -0
- package/src/presentation/screens/components/SettingsHeader/README.md +322 -0
- package/src/presentation/screens/components/sections/CustomSettingsList/README.md +388 -0
- package/src/presentation/screens/components/sections/FeatureSettingsSection/README.md +232 -0
- package/src/presentation/screens/components/sections/IdentitySettingsSection/README.md +325 -0
- package/src/presentation/screens/components/sections/ProfileSectionLoader/README.md +480 -0
- package/src/presentation/screens/components/sections/SupportSettingsSection/README.md +391 -0
- package/src/presentation/screens/hooks/README.md +383 -0
- package/src/presentation/screens/types/README.md +439 -0
- package/src/presentation/screens/utils/README.md +288 -0
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
# Settings Footer
|
|
2
|
+
|
|
3
|
+
Footer component for displaying app version, build information, and additional metadata at the bottom of the settings screen.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Version Display**: Shows app version and build number
|
|
8
|
+
- **Customizable**: Support for custom footer text
|
|
9
|
+
- **Styled**: Uses design system tokens for consistent styling
|
|
10
|
+
- **Optional**: Can be shown/hidden based on configuration
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
This component is part of `@umituz/react-native-settings`.
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
### Basic Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { SettingsFooter } from '@umituz/react-native-settings';
|
|
22
|
+
|
|
23
|
+
function SettingsScreen() {
|
|
24
|
+
return (
|
|
25
|
+
<ScrollView>
|
|
26
|
+
<SettingsContent />
|
|
27
|
+
<SettingsFooter
|
|
28
|
+
appVersion="1.0.0"
|
|
29
|
+
buildNumber="100"
|
|
30
|
+
/>
|
|
31
|
+
</ScrollView>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### With Custom Text
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
function SettingsScreen() {
|
|
40
|
+
return (
|
|
41
|
+
<View>
|
|
42
|
+
<SettingsContent />
|
|
43
|
+
<SettingsFooter
|
|
44
|
+
appVersion="1.0.0"
|
|
45
|
+
buildNumber="100"
|
|
46
|
+
customText="© 2025 My Company. All rights reserved."
|
|
47
|
+
/>
|
|
48
|
+
</View>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### With Development Build
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
function SettingsScreen() {
|
|
57
|
+
const isDev = __DEV__;
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<View>
|
|
61
|
+
<SettingsContent />
|
|
62
|
+
<SettingsFooter
|
|
63
|
+
appVersion="1.0.0"
|
|
64
|
+
buildNumber="100"
|
|
65
|
+
showEnvironment={isDev}
|
|
66
|
+
environment={isDev ? 'Development' : 'Production'}
|
|
67
|
+
/>
|
|
68
|
+
</View>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Props
|
|
74
|
+
|
|
75
|
+
### SettingsFooterProps
|
|
76
|
+
|
|
77
|
+
| Prop | Type | Default | Description |
|
|
78
|
+
|------|------|---------|-------------|
|
|
79
|
+
| `appVersion` | `string` | **Required** | App version number |
|
|
80
|
+
| `buildNumber` | `string` | `undefined` | Build number |
|
|
81
|
+
| `customText` | `string` | `undefined` | Custom footer text |
|
|
82
|
+
| `showEnvironment` | `boolean` | `false` | Show environment label |
|
|
83
|
+
| `environment` | `string` | `undefined` | Environment name (e.g., "Dev", "Staging") |
|
|
84
|
+
| `showBuildInfo` | `boolean` | `true` | Show build number |
|
|
85
|
+
| `style` | `ViewStyle` | `undefined` | Custom container style |
|
|
86
|
+
|
|
87
|
+
## Component Structure
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
SettingsFooter
|
|
91
|
+
├── Version Number (e.g., "Version 1.0.0")
|
|
92
|
+
├── Build Number (e.g., "Build 100")
|
|
93
|
+
├── Environment Label (e.g., "Development")
|
|
94
|
+
└── Custom Text (e.g., "© 2025 My Company")
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Examples
|
|
98
|
+
|
|
99
|
+
### Standard Footer
|
|
100
|
+
|
|
101
|
+
```tsx
|
|
102
|
+
<SettingsFooter
|
|
103
|
+
appVersion="1.0.0"
|
|
104
|
+
buildNumber="100"
|
|
105
|
+
/>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Displays:
|
|
109
|
+
```
|
|
110
|
+
Version 1.0.0
|
|
111
|
+
Build 100
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Minimal Footer
|
|
115
|
+
|
|
116
|
+
```tsx
|
|
117
|
+
<SettingsFooter
|
|
118
|
+
appVersion="1.0.0"
|
|
119
|
+
showBuildInfo={false}
|
|
120
|
+
/>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Displays:
|
|
124
|
+
```
|
|
125
|
+
Version 1.0.0
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Footer with Copyright
|
|
129
|
+
|
|
130
|
+
```tsx
|
|
131
|
+
<SettingsFooter
|
|
132
|
+
appVersion="2.0.0"
|
|
133
|
+
buildNumber="200"
|
|
134
|
+
customText="© 2025 My Company. All rights reserved."
|
|
135
|
+
/>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Displays:
|
|
139
|
+
```
|
|
140
|
+
Version 2.0.0
|
|
141
|
+
Build 200
|
|
142
|
+
© 2025 My Company. All rights reserved.
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Development Build Footer
|
|
146
|
+
|
|
147
|
+
```tsx
|
|
148
|
+
<SettingsFooter
|
|
149
|
+
appVersion="1.0.0"
|
|
150
|
+
buildNumber="100"
|
|
151
|
+
showEnvironment={true}
|
|
152
|
+
environment="Development"
|
|
153
|
+
/>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Displays:
|
|
157
|
+
```
|
|
158
|
+
Version 1.0.0
|
|
159
|
+
Build 100
|
|
160
|
+
Development
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Production Footer
|
|
164
|
+
|
|
165
|
+
```tsx
|
|
166
|
+
<SettingsFooter
|
|
167
|
+
appVersion="1.5.2"
|
|
168
|
+
buildNumber="152"
|
|
169
|
+
showEnvironment={true}
|
|
170
|
+
environment="Production"
|
|
171
|
+
customText="Made with ❤️ by My Team"
|
|
172
|
+
/>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Displays:
|
|
176
|
+
```
|
|
177
|
+
Version 1.5.2
|
|
178
|
+
Build 152
|
|
179
|
+
Production
|
|
180
|
+
Made with ❤️ by My Team
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Styling
|
|
184
|
+
|
|
185
|
+
### Default Styles
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
const styles = StyleSheet.create({
|
|
189
|
+
container: {
|
|
190
|
+
paddingVertical: tokens.spacing.xl, // 24px
|
|
191
|
+
paddingHorizontal: tokens.spacing.lg, // 16px
|
|
192
|
+
alignItems: 'center',
|
|
193
|
+
backgroundColor: tokens.colors.surface,
|
|
194
|
+
},
|
|
195
|
+
versionText: {
|
|
196
|
+
fontSize: tokens.typography.fontSize.sm, // 14px
|
|
197
|
+
color: tokens.colors.textSecondary,
|
|
198
|
+
textAlign: 'center',
|
|
199
|
+
},
|
|
200
|
+
buildText: {
|
|
201
|
+
fontSize: tokens.typography.fontSize.xs, // 12px
|
|
202
|
+
color: tokens.colors.textTertiary,
|
|
203
|
+
textAlign: 'center',
|
|
204
|
+
marginTop: tokens.spacing.xs, // 4px
|
|
205
|
+
},
|
|
206
|
+
customText: {
|
|
207
|
+
fontSize: tokens.typography.fontSize.xs, // 12px
|
|
208
|
+
color: tokens.colors.textTertiary,
|
|
209
|
+
textAlign: 'center',
|
|
210
|
+
marginTop: tokens.spacing.sm, // 8px
|
|
211
|
+
},
|
|
212
|
+
environmentBadge: {
|
|
213
|
+
backgroundColor: tokens.colors.warning,
|
|
214
|
+
paddingHorizontal: tokens.spacing.sm, // 8px
|
|
215
|
+
paddingVertical: tokens.spacing.xs, // 4px
|
|
216
|
+
borderRadius: tokens.borderRadius.sm, // 4px
|
|
217
|
+
marginTop: tokens.spacing.sm, // 8px
|
|
218
|
+
},
|
|
219
|
+
environmentText: {
|
|
220
|
+
fontSize: tokens.typography.fontSize.xs, // 12px
|
|
221
|
+
color: tokens.colors.surface,
|
|
222
|
+
fontWeight: '600',
|
|
223
|
+
},
|
|
224
|
+
});
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Custom Styled Footer
|
|
228
|
+
|
|
229
|
+
```tsx
|
|
230
|
+
<SettingsFooter
|
|
231
|
+
appVersion="1.0.0"
|
|
232
|
+
buildNumber="100"
|
|
233
|
+
style={{
|
|
234
|
+
backgroundColor: '#f5f5f5',
|
|
235
|
+
borderTopWidth: 1,
|
|
236
|
+
borderTopColor: '#e0e0e0',
|
|
237
|
+
paddingVertical: 20,
|
|
238
|
+
}}
|
|
239
|
+
/>
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## Environment Labels
|
|
243
|
+
|
|
244
|
+
### Development
|
|
245
|
+
|
|
246
|
+
```tsx
|
|
247
|
+
<SettingsFooter
|
|
248
|
+
appVersion="1.0.0"
|
|
249
|
+
showEnvironment={true}
|
|
250
|
+
environment="Development"
|
|
251
|
+
/>
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Shows a yellow badge with "Development".
|
|
255
|
+
|
|
256
|
+
### Staging
|
|
257
|
+
|
|
258
|
+
```tsx
|
|
259
|
+
<SettingsFooter
|
|
260
|
+
appVersion="1.0.0"
|
|
261
|
+
showEnvironment={true}
|
|
262
|
+
environment="Staging"
|
|
263
|
+
/>
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Shows an orange badge with "Staging".
|
|
267
|
+
|
|
268
|
+
### Production
|
|
269
|
+
|
|
270
|
+
```tsx
|
|
271
|
+
<SettingsFooter
|
|
272
|
+
appVersion="1.0.0"
|
|
273
|
+
showEnvironment={true}
|
|
274
|
+
environment="Production"
|
|
275
|
+
/>
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Shows a green badge with "Production".
|
|
279
|
+
|
|
280
|
+
## Getting Version Info
|
|
281
|
+
|
|
282
|
+
### From Constants
|
|
283
|
+
|
|
284
|
+
```tsx
|
|
285
|
+
import Constants from 'expo-constants';
|
|
286
|
+
|
|
287
|
+
function SettingsScreen() {
|
|
288
|
+
return (
|
|
289
|
+
<SettingsFooter
|
|
290
|
+
appVersion={Constants.expoConfig.version}
|
|
291
|
+
buildNumber={Constants.expoConfig.ios?.buildNumber || Constants.expoConfig.android?.versionCode}
|
|
292
|
+
/>
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### From React Native
|
|
298
|
+
|
|
299
|
+
```tsx
|
|
300
|
+
import { NativeModules, Platform } from 'react-native';
|
|
301
|
+
|
|
302
|
+
function SettingsScreen() {
|
|
303
|
+
const version = Platform.select({
|
|
304
|
+
ios: NativeModules.RNVersion?.version,
|
|
305
|
+
android: NativeModules.RNVersion?.versionName,
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
const buildNumber = Platform.select({
|
|
309
|
+
ios: NativeModules.RNVersion?.build,
|
|
310
|
+
android: NativeModules.RNVersion?.versionCode,
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
return (
|
|
314
|
+
<SettingsFooter
|
|
315
|
+
appVersion={version}
|
|
316
|
+
buildNumber={buildNumber}
|
|
317
|
+
/>
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### From App Config
|
|
323
|
+
|
|
324
|
+
```tsx
|
|
325
|
+
import appConfig from '../app.json';
|
|
326
|
+
|
|
327
|
+
function SettingsScreen() {
|
|
328
|
+
const { expo } = appConfig;
|
|
329
|
+
|
|
330
|
+
return (
|
|
331
|
+
<SettingsFooter
|
|
332
|
+
appVersion={expo.version}
|
|
333
|
+
buildNumber={expo.ios?.buildNumber || expo.android?.versionCode}
|
|
334
|
+
/>
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
## Layout Integration
|
|
340
|
+
|
|
341
|
+
### In ScrollView
|
|
342
|
+
|
|
343
|
+
```tsx
|
|
344
|
+
function SettingsScreen() {
|
|
345
|
+
return (
|
|
346
|
+
<ScrollView style={styles.scrollView}>
|
|
347
|
+
<SettingsContent />
|
|
348
|
+
<SettingsFooter appVersion="1.0.0" />
|
|
349
|
+
</ScrollView>
|
|
350
|
+
);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
const styles = StyleSheet.create({
|
|
354
|
+
scrollView: {
|
|
355
|
+
flex: 1,
|
|
356
|
+
},
|
|
357
|
+
});
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### In FlatList Footer
|
|
361
|
+
|
|
362
|
+
```tsx
|
|
363
|
+
function SettingsScreen() {
|
|
364
|
+
const renderItem = ({ item }) => <SettingsItemCard {...item} />;
|
|
365
|
+
|
|
366
|
+
const ListFooterComponent = () => (
|
|
367
|
+
<SettingsFooter appVersion="1.0.0" />
|
|
368
|
+
);
|
|
369
|
+
|
|
370
|
+
return (
|
|
371
|
+
<FlatList
|
|
372
|
+
data={settingsItems}
|
|
373
|
+
renderItem={renderItem}
|
|
374
|
+
ListFooterComponent={ListFooterComponent}
|
|
375
|
+
/>
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### In SafeAreaView
|
|
381
|
+
|
|
382
|
+
```tsx
|
|
383
|
+
function SettingsScreen() {
|
|
384
|
+
return (
|
|
385
|
+
<SafeAreaView style={styles.container} edges={['bottom']}>
|
|
386
|
+
<SettingsContent />
|
|
387
|
+
<SettingsFooter appVersion="1.0.0" />
|
|
388
|
+
</SafeAreaView>
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
## Conditional Display
|
|
394
|
+
|
|
395
|
+
### Based on Build Mode
|
|
396
|
+
|
|
397
|
+
```tsx
|
|
398
|
+
function SettingsScreen() {
|
|
399
|
+
const showBuildInfo = __DEV__;
|
|
400
|
+
|
|
401
|
+
return (
|
|
402
|
+
<SettingsFooter
|
|
403
|
+
appVersion="1.0.0"
|
|
404
|
+
buildNumber={showBuildInfo ? "100" : undefined}
|
|
405
|
+
showBuildInfo={showBuildInfo}
|
|
406
|
+
/>
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### Based on Environment
|
|
412
|
+
|
|
413
|
+
```tsx
|
|
414
|
+
function SettingsScreen() {
|
|
415
|
+
const environment = Constants.expoConfig.extra?.environment;
|
|
416
|
+
const isProduction = environment === 'production';
|
|
417
|
+
|
|
418
|
+
return (
|
|
419
|
+
<SettingsFooter
|
|
420
|
+
appVersion="1.0.0"
|
|
421
|
+
showEnvironment={!isProduction}
|
|
422
|
+
environment={environment}
|
|
423
|
+
/>
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
## Best Practices
|
|
429
|
+
|
|
430
|
+
1. **Version Info**: Always display app version for support
|
|
431
|
+
2. **Build Numbers**: Show build numbers in development builds
|
|
432
|
+
3. **Environment**: Display environment in non-production builds
|
|
433
|
+
4. **Custom Text**: Keep custom text brief and relevant
|
|
434
|
+
5. **Styling**: Use design system tokens for consistency
|
|
435
|
+
6. **Placement**: Place at bottom of scrollable content
|
|
436
|
+
7. **Accessibility**: Ensure text is readable and accessible
|
|
437
|
+
|
|
438
|
+
## Related
|
|
439
|
+
|
|
440
|
+
- **SettingsContent**: Main content component
|
|
441
|
+
- **SettingsScreen**: Screen component
|
|
442
|
+
- **SettingsSection**: Section component
|
|
443
|
+
|
|
444
|
+
## License
|
|
445
|
+
|
|
446
|
+
MIT
|