@umituz/react-native-design-system 2.6.93 → 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/exports/theme.ts +0 -1
- 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/IconContainer.tsx +1 -1
- 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 -92
- package/src/molecules/swipe-actions/README.md +376 -588
|
@@ -1,363 +1,252 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Button
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Clickable button component with multiple variants and sizes for React Native applications.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Import & Usage
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- 📐 **Full Width**: Tam genişlik desteği
|
|
13
|
-
- ♿ **Erişilebilirlik**: Tam erişilebilirlik desteği
|
|
7
|
+
```typescript
|
|
8
|
+
import { Button } from 'react-native-design-system/src/atoms/button';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Location:** `src/atoms/button/Button.tsx`
|
|
14
12
|
|
|
15
|
-
##
|
|
13
|
+
## Basic Usage
|
|
16
14
|
|
|
17
15
|
```tsx
|
|
18
|
-
|
|
16
|
+
<Button title="Click me" onPress={handlePress} />
|
|
19
17
|
```
|
|
20
18
|
|
|
21
|
-
##
|
|
19
|
+
## Strategy
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
import React from 'react';
|
|
25
|
-
import { View } from 'react-native';
|
|
26
|
-
import { AtomicButton } from 'react-native-design-system';
|
|
27
|
-
|
|
28
|
-
export const BasicExample = () => {
|
|
29
|
-
return (
|
|
30
|
-
<View style={{ padding: 16 }}>
|
|
31
|
-
<AtomicButton
|
|
32
|
-
title="Buton"
|
|
33
|
-
onPress={() => console.log('Tıklandı!')}
|
|
34
|
-
/>
|
|
35
|
-
</View>
|
|
36
|
-
);
|
|
37
|
-
};
|
|
38
|
-
```
|
|
21
|
+
**Purpose**: Provide consistent, accessible, and performant button interactions throughout the application.
|
|
39
22
|
|
|
40
|
-
|
|
23
|
+
**When to Use**:
|
|
24
|
+
- Primary actions (submit, confirm, save)
|
|
25
|
+
- Secondary actions (cancel, go back)
|
|
26
|
+
- Destructive actions (delete, remove)
|
|
27
|
+
- Navigation actions (open link, go to screen)
|
|
41
28
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
variant="primary"
|
|
47
|
-
title="Primary"
|
|
48
|
-
onPress={() => {}}
|
|
49
|
-
/>
|
|
50
|
-
|
|
51
|
-
{/* Secondary */}
|
|
52
|
-
<AtomicButton
|
|
53
|
-
variant="secondary"
|
|
54
|
-
title="Secondary"
|
|
55
|
-
onPress={() => {}}
|
|
56
|
-
/>
|
|
57
|
-
|
|
58
|
-
{/* Tertiary */}
|
|
59
|
-
<AtomicButton
|
|
60
|
-
variant="tertiary"
|
|
61
|
-
title="Tertiary"
|
|
62
|
-
onPress={() => {}}
|
|
63
|
-
/>
|
|
64
|
-
|
|
65
|
-
{/* Surface */}
|
|
66
|
-
<AtomicButton
|
|
67
|
-
variant="surface"
|
|
68
|
-
title="Surface"
|
|
69
|
-
onPress={() => {}}
|
|
70
|
-
/>
|
|
71
|
-
|
|
72
|
-
{/* Outline */}
|
|
73
|
-
<AtomicButton
|
|
74
|
-
variant="outline"
|
|
75
|
-
title="Outline"
|
|
76
|
-
onPress={() => {}}
|
|
77
|
-
/>
|
|
78
|
-
|
|
79
|
-
{/* Ghost */}
|
|
80
|
-
<AtomicButton
|
|
81
|
-
variant="ghost"
|
|
82
|
-
title="Ghost"
|
|
83
|
-
onPress={() => {}}
|
|
84
|
-
/>
|
|
85
|
-
</View>
|
|
86
|
-
```
|
|
29
|
+
**When NOT to Use**:
|
|
30
|
+
- For navigation - use Navigation components instead
|
|
31
|
+
- For complex interactions - use Pressable or TouchableOpacity
|
|
32
|
+
- For icon-only buttons - use IconButton instead
|
|
87
33
|
|
|
88
|
-
##
|
|
34
|
+
## Rules
|
|
89
35
|
|
|
90
|
-
|
|
91
|
-
<View style={{ gap: 12 }}>
|
|
92
|
-
{/* Small */}
|
|
93
|
-
<AtomicButton
|
|
94
|
-
size="sm"
|
|
95
|
-
title="Small"
|
|
96
|
-
onPress={() => {}}
|
|
97
|
-
/>
|
|
98
|
-
|
|
99
|
-
{/* Medium (Varsayılan) */}
|
|
100
|
-
<AtomicButton
|
|
101
|
-
size="md"
|
|
102
|
-
title="Medium"
|
|
103
|
-
onPress={() => {}}
|
|
104
|
-
/>
|
|
105
|
-
|
|
106
|
-
{/* Large */}
|
|
107
|
-
<AtomicButton
|
|
108
|
-
size="lg"
|
|
109
|
-
title="Large"
|
|
110
|
-
onPress={() => {}}
|
|
111
|
-
/>
|
|
112
|
-
</View>
|
|
113
|
-
```
|
|
36
|
+
### Required
|
|
114
37
|
|
|
115
|
-
|
|
38
|
+
1. **ALWAYS** provide a `title` prop (except for loading state)
|
|
39
|
+
2. **MUST** have an `onPress` handler (unless disabled)
|
|
40
|
+
3. **NEVER** nest buttons inside buttons
|
|
41
|
+
4. **ALWAYS** provide accessible label for icon-only buttons
|
|
42
|
+
5. **MUST** have adequate touch target size (min 44x44pt)
|
|
116
43
|
|
|
117
|
-
|
|
118
|
-
<View style={{ gap: 12 }}>
|
|
119
|
-
{/* Sol İkon */}
|
|
120
|
-
<AtomicButton
|
|
121
|
-
title="Devam Et"
|
|
122
|
-
icon="arrow-forward-outline"
|
|
123
|
-
iconPosition="left"
|
|
124
|
-
onPress={() => {}}
|
|
125
|
-
/>
|
|
126
|
-
|
|
127
|
-
{/* Sağ İkon */}
|
|
128
|
-
<AtomicButton
|
|
129
|
-
title="Geri"
|
|
130
|
-
icon="arrow-back-outline"
|
|
131
|
-
iconPosition="right"
|
|
132
|
-
onPress={() => {}}
|
|
133
|
-
/>
|
|
134
|
-
|
|
135
|
-
{/* Sadece İkon */}
|
|
136
|
-
<AtomicButton
|
|
137
|
-
icon="add-outline"
|
|
138
|
-
onPress={() => {}}
|
|
139
|
-
/>
|
|
140
|
-
</View>
|
|
141
|
-
```
|
|
44
|
+
### Disabled State
|
|
142
45
|
|
|
143
|
-
|
|
46
|
+
1. **MUST** visually indicate disabled state
|
|
47
|
+
2. **MUST NOT** respond to touch when disabled
|
|
48
|
+
3. **SHOULD** provide reason for disabled state (tooltip or hint)
|
|
144
49
|
|
|
145
|
-
|
|
146
|
-
<AtomicButton
|
|
147
|
-
title="Yükleniyor"
|
|
148
|
-
loading
|
|
149
|
-
onPress={() => {}}
|
|
150
|
-
/>
|
|
151
|
-
```
|
|
50
|
+
### Variants
|
|
152
51
|
|
|
153
|
-
|
|
52
|
+
1. **Primary**: Single primary action per screen/section
|
|
53
|
+
2. **Secondary**: Multiple secondary actions allowed
|
|
54
|
+
3. **Destructive**: Reserved for destructive actions only
|
|
55
|
+
4. **Ghost**: For tertiary actions or cancel buttons
|
|
154
56
|
|
|
155
|
-
|
|
156
|
-
<AtomicButton
|
|
157
|
-
title="Devre Dışı"
|
|
158
|
-
disabled
|
|
159
|
-
onPress={() => {}}
|
|
160
|
-
/>
|
|
161
|
-
```
|
|
57
|
+
## Forbidden
|
|
162
58
|
|
|
163
|
-
|
|
59
|
+
❌ **NEVER** do these:
|
|
164
60
|
|
|
165
61
|
```tsx
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
fullWidth
|
|
169
|
-
onPress={() => {}}
|
|
170
|
-
/>
|
|
171
|
-
```
|
|
62
|
+
// ❌ Empty buttons
|
|
63
|
+
<Button />
|
|
172
64
|
|
|
173
|
-
|
|
65
|
+
// ❌ Nested buttons
|
|
66
|
+
<Button onPress={action1}>
|
|
67
|
+
<Button onPress={action2} />
|
|
68
|
+
</Button>
|
|
174
69
|
|
|
175
|
-
|
|
70
|
+
// ❌ Buttons without onPress
|
|
71
|
+
<Button title="Click me" />
|
|
176
72
|
|
|
177
|
-
|
|
178
|
-
<
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
loading={isSubmitting}
|
|
183
|
-
onPress={handleSubmit}
|
|
184
|
-
/>
|
|
185
|
-
```
|
|
73
|
+
// ❌ Inline buttons (use Link instead)
|
|
74
|
+
<View style={{ flexDirection: 'row' }}>
|
|
75
|
+
<Text>Click </Text>
|
|
76
|
+
<Button title="here" />
|
|
77
|
+
</View>
|
|
186
78
|
|
|
187
|
-
|
|
79
|
+
// ❌ Too many primary buttons
|
|
80
|
+
<View>
|
|
81
|
+
<Button variant="primary" title="Save" />
|
|
82
|
+
<Button variant="primary" title="Cancel" /> {/* ❌ Use ghost */}
|
|
83
|
+
</View>
|
|
188
84
|
|
|
189
|
-
|
|
190
|
-
<
|
|
191
|
-
variant="outline"
|
|
192
|
-
title="Sil"
|
|
193
|
-
icon="trash-outline"
|
|
194
|
-
onPress={handleDelete}
|
|
195
|
-
/>
|
|
85
|
+
// ❌ Hardcoded text (use i18n)
|
|
86
|
+
<Button title="Submit" /> {/* ❌ Use t('buttons.submit') */}
|
|
196
87
|
```
|
|
197
88
|
|
|
198
|
-
|
|
89
|
+
## Best Practices
|
|
199
90
|
|
|
200
|
-
|
|
201
|
-
<AtomicButton
|
|
202
|
-
variant="ghost"
|
|
203
|
-
title="İptal"
|
|
204
|
-
onPress={handleCancel}
|
|
205
|
-
/>
|
|
206
|
-
```
|
|
91
|
+
### Button Placement
|
|
207
92
|
|
|
208
|
-
|
|
93
|
+
✅ **DO**:
|
|
94
|
+
- Place primary action at bottom-right or top-right
|
|
95
|
+
- Group related actions together
|
|
96
|
+
- Use consistent button order (Cancel, OK) or (OK, Cancel)
|
|
209
97
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
icon="add-outline"
|
|
215
|
-
onPress={() => {}}
|
|
216
|
-
/>
|
|
217
|
-
|
|
218
|
-
<AtomicButton
|
|
219
|
-
variant="surface"
|
|
220
|
-
icon="create-outline"
|
|
221
|
-
onPress={() => {}}
|
|
222
|
-
/>
|
|
223
|
-
|
|
224
|
-
<AtomicButton
|
|
225
|
-
variant="surface"
|
|
226
|
-
icon="trash-outline"
|
|
227
|
-
onPress={() => {}}
|
|
228
|
-
/>
|
|
229
|
-
</View>
|
|
230
|
-
```
|
|
98
|
+
❌ **DON'T**:
|
|
99
|
+
- Place primary action in middle of other actions
|
|
100
|
+
- Mix button order inconsistently
|
|
101
|
+
- Use too many buttons on one screen
|
|
231
102
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
### AtomicButtonProps
|
|
235
|
-
|
|
236
|
-
| Prop | Tip | Varsayılan | Açıklama |
|
|
237
|
-
|------|-----|------------|----------|
|
|
238
|
-
| `title` | `string` | - | Buton metni |
|
|
239
|
-
| `children` | `ReactNode` | - | Alternatif içerik |
|
|
240
|
-
| `onPress` | `() => void` | - **(Zorunlu)** | Tıklama olayı |
|
|
241
|
-
| `variant` | `ButtonVariant` | `'primary'` | Buton görünüm stili |
|
|
242
|
-
| `size` | `ButtonSize` | `'md'` | Buton boyutu |
|
|
243
|
-
| `disabled` | `boolean` | `false` | Devre dışı |
|
|
244
|
-
| `loading` | `boolean` | `false` | Yükleme durumu |
|
|
245
|
-
| `icon` | `string` | - | İkon ismi (Ionicons) |
|
|
246
|
-
| `iconPosition` | `'left' \| 'right'` | `'left'` | İkon konumu |
|
|
247
|
-
| `fullWidth` | `boolean` | `false` | Tam genişlik |
|
|
248
|
-
| `style` | `StyleProp<ViewStyle>` | - | Container stil |
|
|
249
|
-
| `textStyle` | `StyleProp<TextStyle>` | - | Metin stil |
|
|
250
|
-
| `activeOpacity` | `number` | `0.8` | Opaklık |
|
|
251
|
-
| `testID` | `string` | - | Test ID'si |
|
|
252
|
-
|
|
253
|
-
### ButtonVariant
|
|
103
|
+
### Button Wording
|
|
254
104
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
| 'surface' // Yüzey butonu
|
|
261
|
-
| 'outline' // Çerçeveli buton
|
|
262
|
-
| 'ghost'; // Hayalet buton
|
|
263
|
-
```
|
|
105
|
+
✅ **DO**:
|
|
106
|
+
- Use action verbs (Save, Delete, Cancel)
|
|
107
|
+
- Be specific (Save Draft vs Save)
|
|
108
|
+
- Use sentence case
|
|
109
|
+
- Keep short (1-3 words)
|
|
264
110
|
|
|
265
|
-
|
|
111
|
+
❌ **DON'T**:
|
|
112
|
+
- Use ambiguous text (OK, Sure, Submit)
|
|
113
|
+
- Use long text (I agree to the terms and conditions)
|
|
114
|
+
- Use all caps (CLICK HERE)
|
|
266
115
|
|
|
267
|
-
|
|
268
|
-
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
269
|
-
```
|
|
116
|
+
### Loading State
|
|
270
117
|
|
|
271
|
-
|
|
118
|
+
✅ **DO**:
|
|
119
|
+
```tsx
|
|
120
|
+
<Button loading={isLoading} onPress={handleSubmit}>
|
|
121
|
+
{isLoading ? 'Saving...' : 'Save'}
|
|
122
|
+
</Button>
|
|
123
|
+
```
|
|
272
124
|
|
|
125
|
+
❌ **DON'T**:
|
|
273
126
|
```tsx
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
onPress={() => {}}
|
|
277
|
-
style={{
|
|
278
|
-
backgroundColor: '#6366f1',
|
|
279
|
-
borderRadius: 8,
|
|
280
|
-
shadowColor: '#6366f1',
|
|
281
|
-
shadowOffset: { width: 0, height: 4 },
|
|
282
|
-
shadowOpacity: 0.3,
|
|
283
|
-
shadowRadius: 8,
|
|
284
|
-
elevation: 8,
|
|
285
|
-
}}
|
|
286
|
-
textStyle={{
|
|
287
|
-
color: '#ffffff',
|
|
288
|
-
fontSize: 16,
|
|
289
|
-
fontWeight: '700',
|
|
290
|
-
}}
|
|
291
|
-
/>
|
|
127
|
+
// Don't disable entire form during load
|
|
128
|
+
<Button disabled={isLoading} />
|
|
292
129
|
```
|
|
293
130
|
|
|
294
|
-
##
|
|
131
|
+
## AI Coding Guidelines
|
|
295
132
|
|
|
296
|
-
###
|
|
133
|
+
### For AI Agents
|
|
297
134
|
|
|
298
|
-
|
|
299
|
-
// Ana eylem
|
|
300
|
-
<AtomicButton variant="primary" title="Kaydet" onPress={save} />
|
|
135
|
+
When generating Button components, follow these rules:
|
|
301
136
|
|
|
302
|
-
|
|
303
|
-
|
|
137
|
+
1. **Always import from correct path**:
|
|
138
|
+
```typescript
|
|
139
|
+
import { Button } from 'react-native-design-system/src/atoms/button';
|
|
140
|
+
```
|
|
304
141
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
142
|
+
2. **Always provide required props**:
|
|
143
|
+
```tsx
|
|
144
|
+
<Button
|
|
145
|
+
title="明确且简洁的标题"
|
|
146
|
+
onPress={具体的处理函数}
|
|
147
|
+
variant="根据上下文选择合适的变体"
|
|
148
|
+
/>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
3. **Always handle loading state**:
|
|
152
|
+
```tsx
|
|
153
|
+
const [loading, setLoading] = useState(false);
|
|
308
154
|
|
|
309
|
-
|
|
155
|
+
<Button
|
|
156
|
+
loading={loading}
|
|
157
|
+
onPress={async () => {
|
|
158
|
+
setLoading(true);
|
|
159
|
+
await handleAction();
|
|
160
|
+
setLoading(false);
|
|
161
|
+
}}
|
|
162
|
+
/>
|
|
163
|
+
```
|
|
310
164
|
|
|
165
|
+
4. **Always use i18n for text**:
|
|
166
|
+
```tsx
|
|
167
|
+
<Button title={t('common.save')} onPress={handleSave} />
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
5. **Never disable without reason**:
|
|
171
|
+
```tsx
|
|
172
|
+
// ❌ Bad
|
|
173
|
+
<Button disabled={true} />
|
|
174
|
+
|
|
175
|
+
// ✅ Good
|
|
176
|
+
<Button disabled={!form.isValid} title={form.error || 'Complete form'} />
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Common Patterns
|
|
180
|
+
|
|
181
|
+
#### Form Submit Button
|
|
311
182
|
```tsx
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
title=
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
183
|
+
<Button
|
|
184
|
+
variant="primary"
|
|
185
|
+
title={t('form.submit')}
|
|
186
|
+
onPress={handleSubmit}
|
|
187
|
+
disabled={!isFormValid}
|
|
188
|
+
loading={isSubmitting}
|
|
318
189
|
/>
|
|
190
|
+
```
|
|
319
191
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
onPress={
|
|
192
|
+
#### Destructive Action
|
|
193
|
+
```tsx
|
|
194
|
+
<Button
|
|
195
|
+
variant="destructive"
|
|
196
|
+
title={t('common.delete')}
|
|
197
|
+
onPress={handleDelete}
|
|
198
|
+
confirmRequired={true}
|
|
326
199
|
/>
|
|
327
200
|
```
|
|
328
201
|
|
|
329
|
-
|
|
330
|
-
|
|
202
|
+
#### Cancel Action
|
|
331
203
|
```tsx
|
|
332
|
-
<
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
onPress={
|
|
336
|
-
disabled={isLoading}
|
|
204
|
+
<Button
|
|
205
|
+
variant="ghost"
|
|
206
|
+
title={t('common.cancel')}
|
|
207
|
+
onPress={handleCancel}
|
|
337
208
|
/>
|
|
338
209
|
```
|
|
339
210
|
|
|
340
|
-
##
|
|
211
|
+
## Props Reference
|
|
212
|
+
|
|
213
|
+
| Prop | Type | Required | Default | Description |
|
|
214
|
+
|------|------|----------|---------|-------------|
|
|
215
|
+
| `title` | `string` | Yes* | - | Button text (*not required for loading) |
|
|
216
|
+
| `onPress` | `() => void` | Yes | - | Press handler |
|
|
217
|
+
| `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'destructive'` | No | `'primary'` | Visual style |
|
|
218
|
+
| `size` | `'small' \| 'medium' \| 'large'` | No | `'medium'` | Button size |
|
|
219
|
+
| `disabled` | `boolean` | No | `false` | Disable button |
|
|
220
|
+
| `loading` | `boolean` | No | `false` | Show loading indicator |
|
|
221
|
+
| `fullWidth` | `boolean` | No | `false` | Expand to full width |
|
|
222
|
+
| `icon` | `string` | No | - | Icon name (Ionicons) |
|
|
223
|
+
|
|
224
|
+
## Accessibility
|
|
225
|
+
|
|
226
|
+
- ✅ Screen reader announces button title
|
|
227
|
+
- ✅ Minimum touch target: 44x44pt
|
|
228
|
+
- ✅ Focus visible on keyboard navigation
|
|
229
|
+
- ✅ Disabled state announced to screen readers
|
|
230
|
+
- ✅ Loading state announced to screen readers
|
|
341
231
|
|
|
342
|
-
|
|
232
|
+
## Performance
|
|
343
233
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
- ✅ Test ID desteği
|
|
234
|
+
1. **Memo handlers**: Use `useCallback` for onPress handlers
|
|
235
|
+
2. **Avoid inline functions**: Don't create functions in render
|
|
236
|
+
3. **Conditional rendering**: Don't render disabled buttons if action unavailable
|
|
348
237
|
|
|
349
|
-
##
|
|
238
|
+
## Related Components
|
|
350
239
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
240
|
+
- [`IconButton`](./icon-button/README.md) - Icon-only buttons
|
|
241
|
+
- [`Link`](./link/README.md) - Navigation links
|
|
242
|
+
- [`Pressable`](../pressable/README.md) - Custom pressable components
|
|
354
243
|
|
|
355
|
-
##
|
|
244
|
+
## Version History
|
|
356
245
|
|
|
357
|
-
-
|
|
358
|
-
-
|
|
359
|
-
-
|
|
246
|
+
- **2.6.0**: Added loading prop
|
|
247
|
+
- **2.5.0**: Added fullWidth support
|
|
248
|
+
- **2.0.0**: Initial release with 4 variants
|
|
360
249
|
|
|
361
|
-
##
|
|
250
|
+
## License
|
|
362
251
|
|
|
363
252
|
MIT
|