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 = '#6200EE'; // Violet Material
213
- textColor = '#FFFFFF';
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 = '#007AFF'; // Bleu iOS
227
- textColor = '#FFFFFF';
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.selectedIndex === i ? '#0056CC' : '#D9D9D9';
237
+ backgroundColor = this.backgroundColor;
236
238
  }
237
239
  }
238
240
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canvasframework",
3
- "version": "0.5.47",
3
+ "version": "0.5.48",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/beyons/CanvasFramework.git"