@umituz/react-native-design-system 2.9.24 → 2.9.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-design-system",
3
- "version": "2.9.24",
3
+ "version": "2.9.26",
4
4
  "description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive, safe area, exception, infinite scroll, UUID, image, timezone, offline, onboarding, and loading utilities",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -8,6 +8,7 @@ import React, { useEffect } from 'react';
8
8
  import { View, Modal, StyleSheet, TouchableOpacity, ViewStyle } from 'react-native';
9
9
  import { useAppDesignTokens } from '../theme';
10
10
  import { useResponsive } from '../responsive';
11
+ import { AtomicText } from '../atoms/AtomicText';
11
12
 
12
13
  declare const __DEV__: boolean;
13
14
 
@@ -18,6 +19,8 @@ export interface BaseModalProps {
18
19
  dismissOnBackdrop?: boolean;
19
20
  contentStyle?: ViewStyle;
20
21
  testID?: string;
22
+ title?: string;
23
+ subtitle?: string;
21
24
  }
22
25
 
23
26
  export const BaseModal: React.FC<BaseModalProps> = ({
@@ -27,6 +30,8 @@ export const BaseModal: React.FC<BaseModalProps> = ({
27
30
  dismissOnBackdrop = true,
28
31
  contentStyle,
29
32
  testID = 'base-modal',
33
+ title,
34
+ subtitle,
30
35
  }) => {
31
36
  const tokens = useAppDesignTokens();
32
37
  const { modalLayout } = useResponsive();
@@ -89,6 +94,37 @@ export const BaseModal: React.FC<BaseModalProps> = ({
89
94
  ]}
90
95
  testID={`${testID}-content`}
91
96
  >
97
+ {(title || subtitle) && (
98
+ <View style={{
99
+ paddingTop: tokens.spacing.lg,
100
+ paddingHorizontal: tokens.spacing.md,
101
+ paddingBottom: tokens.spacing.md,
102
+ }}>
103
+ {title && (
104
+ <AtomicText
105
+ type="headingMedium"
106
+ style={{
107
+ textAlign: 'center',
108
+ marginBottom: subtitle ? tokens.spacing.xs : 0,
109
+ }}
110
+ >
111
+ {title}
112
+ </AtomicText>
113
+ )}
114
+ {subtitle && (
115
+ <AtomicText
116
+ type="bodyMedium"
117
+ style={{
118
+ color: tokens.colors.textSecondary,
119
+ textAlign: 'center',
120
+ lineHeight: 20,
121
+ }}
122
+ >
123
+ {subtitle}
124
+ </AtomicText>
125
+ )}
126
+ </View>
127
+ )}
92
128
  {children}
93
129
  </View>
94
130
  </View>
@@ -11,7 +11,7 @@ import type { OnboardingTheme, OnboardingColors } from "../types/OnboardingTheme
11
11
  export interface OnboardingTranslations {
12
12
  nextButton: string;
13
13
  getStartedButton: string;
14
- of: string;
14
+ of?: string;
15
15
  }
16
16
 
17
17
  interface OnboardingProviderValue {