aport-tools 4.4.2 → 4.4.3

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! aport-tools v4.4.2 | ISC */
1
+ /*! aport-tools v4.4.3 | ISC */
2
2
  'use strict';
3
3
 
4
4
  var React = require('react');
@@ -233,17 +233,47 @@ var Stepper = function Stepper(_a) {
233
233
  switch (stepType) {
234
234
  case "icon":
235
235
  if (Array.isArray(icon)) {
236
- return icon[index]; // Render individual icon for each step
236
+ var stepIcon = icon[index];
237
+ if (typeof stepIcon === "string") {
238
+ return /*#__PURE__*/React.createElement(reactNative.Image, {
239
+ source: {
240
+ uri: stepIcon
241
+ },
242
+ style: {
243
+ width: 24,
244
+ height: 24
245
+ },
246
+ resizeMode: "contain"
247
+ });
248
+ } else {
249
+ console.error("Invalid icon value for step ".concat(index, ". Expected a string URI."));
250
+ return null;
251
+ }
237
252
  }
238
- return icon;
239
- // Render the same icon for all steps
253
+ if (typeof icon === "string") {
254
+ return /*#__PURE__*/React.createElement(reactNative.Image, {
255
+ source: {
256
+ uri: icon
257
+ },
258
+ style: {
259
+ width: 24,
260
+ height: 24
261
+ },
262
+ resizeMode: "contain"
263
+ });
264
+ }
265
+ console.error("Icon prop must be a string or an array of strings.");
266
+ return null;
240
267
  case "empty":
241
268
  return null;
242
- // Render nothing inside the step circle
243
269
  case "number":
244
270
  default:
245
- return index + 1;
246
- // Default to rendering step numbers
271
+ return /*#__PURE__*/React.createElement(Text, {
272
+ style: {
273
+ fontSize: 16,
274
+ fontWeight: "bold"
275
+ }
276
+ }, index + 1);
247
277
  }
248
278
  };
249
279
  return /*#__PURE__*/React.createElement(reactNative.View, {
@@ -275,7 +305,8 @@ var Stepper = function Stepper(_a) {
275
305
  style: styles$9.separatorBackground
276
306
  }), /*#__PURE__*/React.createElement(reactNative.Animated.View, {
277
307
  style: [styles$9.separatorProgress, {
278
- width: getSeparatorWidth(index)
308
+ width: getSeparatorWidth(index),
309
+ backgroundColor: colors.primary.hex
279
310
  }]
280
311
  }))));
281
312
  }));
@@ -328,7 +359,6 @@ var styles$9 = reactNative.StyleSheet.create({
328
359
  separatorProgress: {
329
360
  position: "absolute",
330
361
  height: "100%",
331
- backgroundColor: "#3498db",
332
362
  borderRadius: 2
333
363
  }
334
364
  });