@umituz/react-native-design-system 2.6.94 → 2.6.95
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 +1 -1
- package/src/atoms/AtomicAvatar.README.md +284 -397
- package/src/atoms/AtomicBadge.README.md +123 -358
- package/src/atoms/AtomicCard.README.md +358 -247
- package/src/atoms/AtomicDatePicker.README.md +127 -332
- package/src/atoms/AtomicFab.README.md +194 -352
- package/src/atoms/AtomicIcon.README.md +241 -274
- package/src/atoms/AtomicProgress.README.md +100 -338
- package/src/atoms/AtomicSpinner.README.md +304 -337
- package/src/atoms/AtomicText.README.md +153 -389
- package/src/atoms/AtomicTextArea.README.md +267 -268
- package/src/atoms/EmptyState.README.md +247 -292
- package/src/atoms/GlassView/README.md +313 -444
- package/src/atoms/button/README.md +186 -297
- package/src/atoms/button/STRATEGY.md +252 -0
- package/src/atoms/chip/README.md +242 -290
- package/src/atoms/input/README.md +296 -290
- package/src/atoms/picker/README.md +278 -309
- package/src/atoms/skeleton/AtomicSkeleton.README.md +394 -252
- package/src/molecules/BaseModal/README.md +356 -0
- package/src/molecules/BaseModal.README.md +324 -200
- package/src/molecules/ConfirmationModal.README.md +349 -302
- package/src/molecules/Divider/README.md +293 -376
- package/src/molecules/FormField.README.md +321 -534
- package/src/molecules/GlowingCard/GlowingCard.tsx +1 -1
- package/src/molecules/GlowingCard/README.md +230 -372
- package/src/molecules/List/README.md +281 -488
- package/src/molecules/ListItem.README.md +320 -315
- package/src/molecules/SearchBar/README.md +332 -430
- package/src/molecules/StepHeader/README.md +311 -411
- package/src/molecules/StepProgress/README.md +281 -448
- package/src/molecules/alerts/README.md +272 -355
- package/src/molecules/avatar/README.md +295 -356
- package/src/molecules/bottom-sheet/README.md +303 -340
- package/src/molecules/calendar/README.md +301 -265
- package/src/molecules/countdown/README.md +347 -456
- package/src/molecules/emoji/README.md +281 -514
- package/src/molecules/listitem/README.md +307 -399
- package/src/molecules/media-card/MediaCard.tsx +31 -34
- package/src/molecules/media-card/README.md +217 -319
- package/src/molecules/navigation/README.md +263 -284
- package/src/molecules/splash/README.md +76 -80
- package/src/molecules/swipe-actions/README.md +376 -588
|
@@ -1,372 +1,327 @@
|
|
|
1
1
|
# EmptyState
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A component displayed when no data is available. Explains the situation and guides users to take action.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Import & Usage
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- 👆 **Action Button**: Aksiyon butonu desteği
|
|
10
|
-
- 🎨 **Tema Bilinci**: Otomatik tema uyumu
|
|
11
|
-
- ♿ **Erişilebilir**: Tam erişilebilirlik desteği
|
|
12
|
-
|
|
13
|
-
## Kurulum
|
|
14
|
-
|
|
15
|
-
```tsx
|
|
16
|
-
import { EmptyState } from 'react-native-design-system';
|
|
7
|
+
```typescript
|
|
8
|
+
import { EmptyState } from 'react-native-design-system/src/atoms/EmptyState';
|
|
17
9
|
```
|
|
18
10
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```tsx
|
|
22
|
-
import React from 'react';
|
|
23
|
-
import { View } from 'react-native';
|
|
24
|
-
import { EmptyState } from 'react-native-design-system';
|
|
25
|
-
|
|
26
|
-
export const BasicExample = () => {
|
|
27
|
-
return (
|
|
28
|
-
<View style={{ flex: 1 }}>
|
|
29
|
-
<EmptyState
|
|
30
|
-
title="Henüz öğe yok"
|
|
31
|
-
description="İlk öğeyi oluşturmak için başlayın"
|
|
32
|
-
/>
|
|
33
|
-
</View>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
```
|
|
11
|
+
**Location:** `src/atoms/EmptyState.tsx`
|
|
37
12
|
|
|
38
|
-
## Basic
|
|
13
|
+
## Basic Usage
|
|
39
14
|
|
|
40
15
|
```tsx
|
|
41
16
|
<EmptyState
|
|
42
|
-
title="
|
|
17
|
+
title="No items yet"
|
|
18
|
+
description="Get started by creating your first item"
|
|
43
19
|
/>
|
|
44
20
|
```
|
|
45
21
|
|
|
46
|
-
##
|
|
22
|
+
## Strategy
|
|
47
23
|
|
|
48
|
-
|
|
49
|
-
<EmptyState
|
|
50
|
-
title="Henüz mesaj yok"
|
|
51
|
-
description="İlk mesajı gönderin ve sohbeti başlatın"
|
|
52
|
-
/>
|
|
53
|
-
```
|
|
24
|
+
**Purpose**: Communicate empty states clearly and guide users to resolution.
|
|
54
25
|
|
|
55
|
-
|
|
26
|
+
**When to Use**:
|
|
27
|
+
- No data in lists/feeds (empty folders, no results)
|
|
28
|
+
- Error states with recovery action
|
|
29
|
+
- Zero-state onboarding (first-time users)
|
|
30
|
+
- Search returned no results
|
|
31
|
+
- Feature not available yet
|
|
56
32
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
description="Henüz mesajınız bulunmuyor"
|
|
62
|
-
/>
|
|
63
|
-
```
|
|
33
|
+
**When NOT to Use**:
|
|
34
|
+
- Loading states (use AtomicSpinner or AtomicSkeleton)
|
|
35
|
+
- Success states (use success-specific UI)
|
|
36
|
+
- For decorative illustrations without context
|
|
64
37
|
|
|
65
|
-
##
|
|
38
|
+
## Rules
|
|
66
39
|
|
|
67
|
-
|
|
68
|
-
<EmptyState
|
|
69
|
-
icon="document-text-outline"
|
|
70
|
-
title="Henüz içerik yok"
|
|
71
|
-
description="İlk içeriği oluşturmak için butona tıklayın"
|
|
72
|
-
actionLabel="İçerik Oluştur"
|
|
73
|
-
onAction={() => console.log('İçerik oluştur')}
|
|
74
|
-
/>
|
|
75
|
-
```
|
|
40
|
+
### Required
|
|
76
41
|
|
|
77
|
-
|
|
42
|
+
1. **MUST** have a `title` prop explaining the state
|
|
43
|
+
2. **SHOULD** provide `description` for clarity
|
|
44
|
+
3. **MUST** provide actionable next step if applicable
|
|
45
|
+
4. **ALWAYS** use appropriate icon for context
|
|
46
|
+
5. **SHOULD** be concise and scannable
|
|
47
|
+
6. **MUST** have accessible labeling
|
|
48
|
+
7. **ALWAYS** provide action when user can resolve
|
|
78
49
|
|
|
79
|
-
|
|
80
|
-
<EmptyState
|
|
81
|
-
title="Özelleştirilmiş İllüstrasyon"
|
|
82
|
-
illustration={
|
|
83
|
-
<Image
|
|
84
|
-
source={require('./empty-state.png')}
|
|
85
|
-
style={{ width: 200, height: 200 }}
|
|
86
|
-
/>
|
|
87
|
-
}
|
|
88
|
-
description="Açıklama metni"
|
|
89
|
-
/>
|
|
90
|
-
```
|
|
50
|
+
### Content Guidelines
|
|
91
51
|
|
|
92
|
-
|
|
52
|
+
1. **Title**: Short, clear (3-5 words)
|
|
53
|
+
2. **Description**: Helpful, not obvious
|
|
54
|
+
3. **Action**: Clear, action-oriented text
|
|
55
|
+
4. **Icon**: Contextually appropriate
|
|
93
56
|
|
|
94
|
-
###
|
|
57
|
+
### Action Guidelines
|
|
95
58
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
icon="list-outline"
|
|
101
|
-
title="Henüz liste boş"
|
|
102
|
-
description="Listeye öğe eklemek için butona tıklayın"
|
|
103
|
-
actionLabel="Öğe Ekle"
|
|
104
|
-
onAction={() => console.log('Ekle')}
|
|
105
|
-
/>
|
|
106
|
-
);
|
|
107
|
-
};
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Boş Arama
|
|
59
|
+
1. **Provide action**: If user can resolve
|
|
60
|
+
2. **Skip action**: If informational only
|
|
61
|
+
3. **Make primary**: When there's one clear action
|
|
62
|
+
4. **Make optional**: When multiple actions possible
|
|
111
63
|
|
|
112
|
-
|
|
113
|
-
export const EmptySearch = ({ query }) => {
|
|
114
|
-
return (
|
|
115
|
-
<EmptyState
|
|
116
|
-
icon="search-outline"
|
|
117
|
-
title="Sonuç Bulunamadı"
|
|
118
|
-
description={`"${query}" için sonuç bulunamadı`}
|
|
119
|
-
actionLabel="Aramayı Temizle"
|
|
120
|
-
onAction={() => setQuery('')}
|
|
121
|
-
/>
|
|
122
|
-
);
|
|
123
|
-
};
|
|
124
|
-
```
|
|
64
|
+
## Forbidden
|
|
125
65
|
|
|
126
|
-
|
|
66
|
+
❌ **NEVER** do these:
|
|
127
67
|
|
|
128
68
|
```tsx
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<EmptyState
|
|
132
|
-
icon="notifications-off-outline"
|
|
133
|
-
title="Bildirim Yok"
|
|
134
|
-
description="Henüz bildiriminiz bulunmuyor"
|
|
135
|
-
/>
|
|
136
|
-
);
|
|
137
|
-
};
|
|
138
|
-
```
|
|
69
|
+
// ❌ No title
|
|
70
|
+
<EmptyState /> {/* ❌ Missing required context */}
|
|
139
71
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
return (
|
|
145
|
-
<EmptyState
|
|
146
|
-
icon="heart-outline"
|
|
147
|
-
title="Favori Yok"
|
|
148
|
-
description="Beğendiğiniz öğeleri favorilere ekleyin"
|
|
149
|
-
actionLabel="Keşfet"
|
|
150
|
-
onAction={() => navigation.navigate('Explore')}
|
|
151
|
-
/>
|
|
152
|
-
);
|
|
153
|
-
};
|
|
154
|
-
```
|
|
72
|
+
// ❌ Generic title
|
|
73
|
+
<EmptyState
|
|
74
|
+
title="Empty" {/* ❌ Not helpful */}
|
|
75
|
+
/>
|
|
155
76
|
|
|
156
|
-
|
|
77
|
+
// ❌ Obvious description
|
|
78
|
+
<EmptyState
|
|
79
|
+
title="No items"
|
|
80
|
+
description="There are no items here" {/* ❌ States the obvious */}
|
|
81
|
+
/>
|
|
157
82
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
title="Sepetiniz Boş"
|
|
164
|
-
description="Sepetinize ürün ekleyin ve alışverişe başlayın"
|
|
165
|
-
actionLabel="Alışverişe Başla"
|
|
166
|
-
onAction={() => navigation.navigate('Products')}
|
|
167
|
-
/>
|
|
168
|
-
);
|
|
169
|
-
};
|
|
170
|
-
```
|
|
83
|
+
// ❌ Action without handler
|
|
84
|
+
<EmptyState
|
|
85
|
+
actionLabel="Create item"
|
|
86
|
+
// ❌ Missing onAction
|
|
87
|
+
/>
|
|
171
88
|
|
|
172
|
-
|
|
89
|
+
// ❌ Wrong icon
|
|
90
|
+
<EmptyState
|
|
91
|
+
title="No results"
|
|
92
|
+
icon="checkmark-circle" {/* ❌ Confusing - suggests success */}
|
|
93
|
+
/>
|
|
173
94
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
title="İndirme Yok"
|
|
180
|
-
description="İndirilen içeriğiniz burada görünecek"
|
|
181
|
-
/>
|
|
182
|
-
);
|
|
183
|
-
};
|
|
95
|
+
// ❌ Too much text
|
|
96
|
+
<EmptyState
|
|
97
|
+
title="No items found in your search"
|
|
98
|
+
description="You searched for something and we couldn't find it. Try searching again with different terms or checking your spelling." {/* ❌ Too long */}
|
|
99
|
+
/>
|
|
184
100
|
```
|
|
185
101
|
|
|
186
|
-
|
|
102
|
+
## Best Practices
|
|
103
|
+
|
|
104
|
+
### Clear Messaging
|
|
187
105
|
|
|
106
|
+
✅ **DO**:
|
|
188
107
|
```tsx
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
/>
|
|
196
|
-
);
|
|
197
|
-
};
|
|
198
|
-
```
|
|
108
|
+
// ✅ Specific and helpful
|
|
109
|
+
<EmptyState
|
|
110
|
+
title="No conversations yet"
|
|
111
|
+
description="Start a conversation with your contacts"
|
|
112
|
+
icon="chatbubbles-outline"
|
|
113
|
+
/>
|
|
199
114
|
|
|
200
|
-
|
|
115
|
+
// ✅ Action-oriented
|
|
116
|
+
<EmptyState
|
|
117
|
+
title="No search results"
|
|
118
|
+
description="Try adjusting your search terms"
|
|
119
|
+
actionLabel="Clear search"
|
|
120
|
+
onAction={() => setSearchQuery('')}
|
|
121
|
+
/>
|
|
122
|
+
```
|
|
201
123
|
|
|
124
|
+
❌ **DON'T**:
|
|
202
125
|
```tsx
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
/>
|
|
212
|
-
);
|
|
213
|
-
};
|
|
126
|
+
// ❌ Generic
|
|
127
|
+
<EmptyState title="Empty" />
|
|
128
|
+
|
|
129
|
+
// ❌ Obvious description
|
|
130
|
+
<EmptyState
|
|
131
|
+
title="No items"
|
|
132
|
+
description="You have no items"
|
|
133
|
+
/>
|
|
214
134
|
```
|
|
215
135
|
|
|
216
|
-
###
|
|
136
|
+
### Appropriate Actions
|
|
217
137
|
|
|
138
|
+
✅ **DO**:
|
|
218
139
|
```tsx
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
onAction={onRetry}
|
|
227
|
-
/>
|
|
228
|
-
);
|
|
229
|
-
};
|
|
230
|
-
```
|
|
140
|
+
// ✅ Clear action
|
|
141
|
+
<EmptyState
|
|
142
|
+
title="No photos yet"
|
|
143
|
+
description="Take photos to see them here"
|
|
144
|
+
actionLabel="Take Photo"
|
|
145
|
+
onAction={handleTakePhoto}
|
|
146
|
+
/>
|
|
231
147
|
|
|
232
|
-
|
|
148
|
+
// ✅ Multiple options
|
|
149
|
+
<View>
|
|
150
|
+
<EmptyState
|
|
151
|
+
title="No internet connection"
|
|
152
|
+
description="Check your connection and try again"
|
|
153
|
+
icon="wifi-outline"
|
|
154
|
+
/>
|
|
155
|
+
<Button title="Retry" onPress={handleRetry} />
|
|
156
|
+
</View>
|
|
157
|
+
```
|
|
233
158
|
|
|
159
|
+
❌ **DON'T**:
|
|
234
160
|
```tsx
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
161
|
+
// ❌ Action without handler
|
|
162
|
+
<EmptyState
|
|
163
|
+
actionLabel="Create"
|
|
164
|
+
// Missing onAction
|
|
165
|
+
/>
|
|
166
|
+
|
|
167
|
+
// ❌ Vague action
|
|
168
|
+
<EmptyState
|
|
169
|
+
actionLabel="Click here"
|
|
170
|
+
onAction={handleAction}
|
|
171
|
+
/>
|
|
246
172
|
```
|
|
247
173
|
|
|
248
|
-
###
|
|
174
|
+
### Icon Selection
|
|
249
175
|
|
|
176
|
+
✅ **DO**:
|
|
250
177
|
```tsx
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
description="Bu özelliği kullanmak için giriş yapmalısınız"
|
|
257
|
-
actionLabel="Giriş Yap"
|
|
258
|
-
onAction={() => navigation.navigate('Login')}
|
|
259
|
-
/>
|
|
260
|
-
);
|
|
261
|
-
};
|
|
178
|
+
// ✅ Contextually appropriate
|
|
179
|
+
<EmptyState icon="search-outline" title="No results" />
|
|
180
|
+
<EmptyState icon="cart-outline" title="Cart is empty" />
|
|
181
|
+
<EmptyState icon="notifications-off-outline" title="No notifications" />
|
|
182
|
+
<EmptyState icon="wifi-outline" title="No connection" />
|
|
262
183
|
```
|
|
263
184
|
|
|
264
|
-
|
|
265
|
-
|
|
185
|
+
❌ **DON'T**:
|
|
266
186
|
```tsx
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
icon="rocket-outline"
|
|
271
|
-
title="Yakında Burada"
|
|
272
|
-
description="Bu özellik yakında kullanıma sunulacak"
|
|
273
|
-
/>
|
|
274
|
-
);
|
|
275
|
-
};
|
|
187
|
+
// ❌ Confusing icons
|
|
188
|
+
<EmptyState icon="checkmark-circle" title="No results" />
|
|
189
|
+
<EmptyState icon="warning" title="Empty cart" />
|
|
276
190
|
```
|
|
277
191
|
|
|
278
|
-
|
|
279
|
-
|
|
192
|
+
## AI Coding Guidelines
|
|
193
|
+
|
|
194
|
+
### For AI Agents
|
|
195
|
+
|
|
196
|
+
When generating EmptyState components, follow these rules:
|
|
197
|
+
|
|
198
|
+
1. **Always provide clear title**:
|
|
199
|
+
```tsx
|
|
200
|
+
// ✅ Good - specific and clear
|
|
201
|
+
<EmptyState title="No conversations yet" />
|
|
202
|
+
<EmptyState title="Search found no results" />
|
|
203
|
+
|
|
204
|
+
// ❌ Bad - generic
|
|
205
|
+
<EmptyState title="Empty" />
|
|
206
|
+
<EmptyState title="No data" />
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
2. **Always provide helpful description**:
|
|
210
|
+
```tsx
|
|
211
|
+
// ✅ Good - helpful guidance
|
|
212
|
+
<EmptyState
|
|
213
|
+
title="No items"
|
|
214
|
+
description="Get started by creating your first item"
|
|
215
|
+
/>
|
|
216
|
+
|
|
217
|
+
// ❌ Bad - obvious or missing
|
|
218
|
+
<EmptyState
|
|
219
|
+
title="No items"
|
|
220
|
+
description="There are no items" // Obvious
|
|
221
|
+
/>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
3. **Always provide action when resolvable**:
|
|
225
|
+
```tsx
|
|
226
|
+
// ✅ Good - actionable
|
|
227
|
+
<EmptyState
|
|
228
|
+
title="No photos"
|
|
229
|
+
actionLabel="Take Photo"
|
|
230
|
+
onAction={handleTakePhoto}
|
|
231
|
+
/>
|
|
232
|
+
|
|
233
|
+
// ❌ Bad - action without handler
|
|
234
|
+
<EmptyState
|
|
235
|
+
actionLabel="Create"
|
|
236
|
+
// Missing onAction
|
|
237
|
+
/>
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
4. **Always use appropriate icons**:
|
|
241
|
+
```tsx
|
|
242
|
+
// ✅ Good - contextual
|
|
243
|
+
<EmptyState icon="search-outline" title="No results" />
|
|
244
|
+
<EmptyState icon="cart-outline" title="Cart empty" />
|
|
245
|
+
|
|
246
|
+
// ❌ Bad - wrong context
|
|
247
|
+
<EmptyState icon="checkmark-circle" title="No results" />
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Common Patterns
|
|
251
|
+
|
|
252
|
+
#### Basic Empty State
|
|
280
253
|
```tsx
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
title="Bakım Modu"
|
|
286
|
-
description="Sistem bakımında, lütfen daha sonra tekrar deneyin"
|
|
287
|
-
/>
|
|
288
|
-
);
|
|
289
|
-
};
|
|
254
|
+
<EmptyState
|
|
255
|
+
title="No items yet"
|
|
256
|
+
description="Items will appear here when you add them"
|
|
257
|
+
/>
|
|
290
258
|
```
|
|
291
259
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
### EmptyStateProps
|
|
295
|
-
|
|
296
|
-
| Prop | Tip | Varsayılan | Açıklama |
|
|
297
|
-
|------|-----|------------|----------|
|
|
298
|
-
| `icon` | `string` | `'file-tray-outline'` | İkon ismi |
|
|
299
|
-
| `title` | `string` | - **(Zorunlu)** | Başlık metni |
|
|
300
|
-
| `subtitle` | `string` | - | Alt başlık (deprecated, description kullanın) |
|
|
301
|
-
| `description` | `string` | - | Açıklama metni |
|
|
302
|
-
| `actionLabel` | `string` | - | Aksiyon butonu metni |
|
|
303
|
-
| `onAction` | `() => void` | - | Aksiyon callback'i |
|
|
304
|
-
| `illustration` | `ReactNode` | - | Custom illüstrasyon |
|
|
305
|
-
| `style` | `ViewStyle` | - | Özel stil |
|
|
306
|
-
| `testID` | `string` | - | Test ID'si |
|
|
307
|
-
|
|
308
|
-
## Best Practices
|
|
309
|
-
|
|
310
|
-
### 1. İkon Seçimi
|
|
311
|
-
|
|
260
|
+
#### With Action
|
|
312
261
|
```tsx
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
<EmptyState icon="alert-circle-outline" />
|
|
321
|
-
|
|
322
|
-
// Başarı durumu
|
|
323
|
-
<EmptyState icon="checkmark-circle-outline" />
|
|
262
|
+
<EmptyState
|
|
263
|
+
title="No conversations"
|
|
264
|
+
description="Start messaging your contacts"
|
|
265
|
+
icon="chatbubbles-outline"
|
|
266
|
+
actionLabel="Start Chat"
|
|
267
|
+
onAction={handleStartChat}
|
|
268
|
+
/>
|
|
324
269
|
```
|
|
325
270
|
|
|
326
|
-
|
|
327
|
-
|
|
271
|
+
#### Error State
|
|
328
272
|
```tsx
|
|
329
|
-
// Kısa ve açıklayıcı
|
|
330
273
|
<EmptyState
|
|
331
|
-
title="
|
|
332
|
-
description="
|
|
274
|
+
title="Connection Error"
|
|
275
|
+
description="Check your internet connection"
|
|
276
|
+
icon="wifi-outline"
|
|
277
|
+
actionLabel="Retry"
|
|
278
|
+
onAction={handleRetry}
|
|
333
279
|
/>
|
|
334
280
|
```
|
|
335
281
|
|
|
336
|
-
|
|
337
|
-
|
|
282
|
+
#### Search Results
|
|
338
283
|
```tsx
|
|
339
|
-
// Aksiyon varsa
|
|
340
284
|
<EmptyState
|
|
341
|
-
|
|
342
|
-
|
|
285
|
+
title="No results found"
|
|
286
|
+
description={`No results for "${query}"`}
|
|
287
|
+
icon="search-outline"
|
|
288
|
+
actionLabel="Clear search"
|
|
289
|
+
onAction={() => setQuery('')}
|
|
343
290
|
/>
|
|
344
|
-
|
|
345
|
-
// Sadece bilgilendirme
|
|
346
|
-
<EmptyState title="Bilgilendirme" />
|
|
347
291
|
```
|
|
348
292
|
|
|
349
|
-
##
|
|
293
|
+
## Props Reference
|
|
294
|
+
|
|
295
|
+
| Prop | Type | Required | Default | Description |
|
|
296
|
+
|------|------|----------|---------|-------------|
|
|
297
|
+
| `title` | `string` | Yes | - | State title |
|
|
298
|
+
| `description` | `string` | No | - | State description |
|
|
299
|
+
| `icon` | `string` | No | `'file-tray-outline'` | Icon name |
|
|
300
|
+
| `actionLabel` | `string` | No | - | Action button text |
|
|
301
|
+
| `onAction` | `() => void` | No | - | Action callback |
|
|
302
|
+
| `illustration` | `ReactNode` | No | - | Custom illustration |
|
|
303
|
+
| `style` | `ViewStyle` | No | - | Custom style |
|
|
304
|
+
| `testID` | `string` | No | - | Test identifier |
|
|
350
305
|
|
|
351
|
-
|
|
306
|
+
## Accessibility
|
|
352
307
|
|
|
353
|
-
- ✅ Screen reader
|
|
354
|
-
- ✅ Semantic
|
|
355
|
-
- ✅ Touch
|
|
356
|
-
- ✅
|
|
308
|
+
- ✅ Screen reader announces state and action
|
|
309
|
+
- ✅ Semantic meaning from icon
|
|
310
|
+
- ✅ Touch target for action button
|
|
311
|
+
- ✅ Test ID support
|
|
357
312
|
|
|
358
|
-
##
|
|
313
|
+
## Performance Tips
|
|
359
314
|
|
|
360
|
-
1. **Lazy
|
|
361
|
-
2. **Memoization**:
|
|
362
|
-
3. **Simple
|
|
315
|
+
1. **Lazy illustrations**: Load illustration images lazily
|
|
316
|
+
2. **Memoization**: Memo empty state component
|
|
317
|
+
3. **Simple icons**: Prefer icons over complex illustrations
|
|
363
318
|
|
|
364
|
-
##
|
|
319
|
+
## Related Components
|
|
365
320
|
|
|
366
|
-
- [`AtomicSkeleton`](./skeleton/AtomicSkeleton
|
|
367
|
-
- [`AtomicSpinner`](./AtomicSpinner
|
|
368
|
-
- [`AtomicIcon`](./AtomicIcon
|
|
321
|
+
- [`AtomicSkeleton`](./skeleton/AtomicSkeleton.README.md) - Skeleton loading
|
|
322
|
+
- [`AtomicSpinner`](./AtomicSpinner.README.md) - Loading spinner
|
|
323
|
+
- [`AtomicIcon`](./AtomicIcon.README.md) - Icon component
|
|
369
324
|
|
|
370
|
-
##
|
|
325
|
+
## License
|
|
371
326
|
|
|
372
327
|
MIT
|