canvasframework 0.5.47 → 0.5.48
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.
|
@@ -30,6 +30,8 @@ class SegmentedControl extends Component {
|
|
|
30
30
|
this.pressedIndex = null;
|
|
31
31
|
this._isAnimating = false;
|
|
32
32
|
|
|
33
|
+
this.backgroundColor = options.backgroundColor || '#6200EE';
|
|
34
|
+
this.textColor = options.color || '#ffffff';
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
/**
|
|
@@ -209,8 +211,8 @@ class SegmentedControl extends Component {
|
|
|
209
211
|
if (this.platform === 'material') {
|
|
210
212
|
// Material Design
|
|
211
213
|
if (this.selectedIndex === i) {
|
|
212
|
-
backgroundColor =
|
|
213
|
-
textColor =
|
|
214
|
+
backgroundColor = this.backgroundColor; // Violet Material
|
|
215
|
+
textColor = this.textColor;
|
|
214
216
|
} else {
|
|
215
217
|
backgroundColor = '#E0E0E0'; // Gris clair
|
|
216
218
|
textColor = '#000000';
|
|
@@ -223,8 +225,8 @@ class SegmentedControl extends Component {
|
|
|
223
225
|
} else {
|
|
224
226
|
// iOS/Cupertino
|
|
225
227
|
if (this.selectedIndex === i) {
|
|
226
|
-
backgroundColor =
|
|
227
|
-
textColor =
|
|
228
|
+
backgroundColor = this.backgroundColor; // Bleu iOS
|
|
229
|
+
textColor = this.textColor;
|
|
228
230
|
} else {
|
|
229
231
|
backgroundColor = '#F0F0F0'; // Gris très clair iOS
|
|
230
232
|
textColor = '#000000';
|
|
@@ -232,7 +234,7 @@ class SegmentedControl extends Component {
|
|
|
232
234
|
|
|
233
235
|
// Si pressé
|
|
234
236
|
if (this.pressedIndex === i) {
|
|
235
|
-
backgroundColor = this.
|
|
237
|
+
backgroundColor = this.backgroundColor;
|
|
236
238
|
}
|
|
237
239
|
}
|
|
238
240
|
|