react-crud-mobile 1.0.920 → 1.0.922
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/dist/react-crud-mobile.cjs.development.js +5 -31
- package/dist/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js +5 -31
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIButton.tsx +6 -26
|
@@ -370,17 +370,6 @@ function UIIcon(_ref) {
|
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
-
var BUTTONS_SIZE = {
|
|
374
|
-
small: {
|
|
375
|
-
minWidth: 30,
|
|
376
|
-
height: 30
|
|
377
|
-
}
|
|
378
|
-
};
|
|
379
|
-
var ICONS_SIZE = {
|
|
380
|
-
small: {
|
|
381
|
-
fontSize: 14
|
|
382
|
-
}
|
|
383
|
-
};
|
|
384
373
|
function UIButton(props) {
|
|
385
374
|
var scope = props.scope;
|
|
386
375
|
var element = scope.original;
|
|
@@ -422,8 +411,7 @@ function UIButton(props) {
|
|
|
422
411
|
scope.call('click', {});
|
|
423
412
|
};
|
|
424
413
|
var style = function style(part, extra) {
|
|
425
|
-
var
|
|
426
|
-
var css = scope.getStyle(part, s);
|
|
414
|
+
var css = _extends({}, styles[part], extra);
|
|
427
415
|
if (variant === 'text') {
|
|
428
416
|
css.backgroundColor = 'transparent';
|
|
429
417
|
css.color = 'text';
|
|
@@ -439,7 +427,7 @@ function UIButton(props) {
|
|
|
439
427
|
if (align === 'left') {
|
|
440
428
|
css.justifyContent = 'flex-start';
|
|
441
429
|
}
|
|
442
|
-
return css;
|
|
430
|
+
return scope.getStyle(part, css);
|
|
443
431
|
};
|
|
444
432
|
var extra = {};
|
|
445
433
|
if (icon) {
|
|
@@ -460,26 +448,12 @@ function UIButton(props) {
|
|
|
460
448
|
css.minWidth = h;
|
|
461
449
|
}
|
|
462
450
|
}
|
|
463
|
-
if (variant === 'text') {
|
|
464
|
-
css.backgroundColor = 'transparent';
|
|
465
|
-
css.color = 'text';
|
|
466
|
-
}
|
|
467
|
-
if (size) {
|
|
468
|
-
css = _extends({}, css, BUTTONS_SIZE[size]);
|
|
469
|
-
}
|
|
470
|
-
if (align === 'left') {
|
|
471
|
-
css.justifyContent = 'flex-start';
|
|
472
|
-
}
|
|
473
451
|
return css;
|
|
474
452
|
});
|
|
453
|
+
var buttonLabel = style('buttonLabel');
|
|
475
454
|
var iconStyle = reactCrudUtils.Utils.call(function () {
|
|
476
455
|
var css = style('buttonIcon', extra.icon);
|
|
477
|
-
|
|
478
|
-
css.color = 'text';
|
|
479
|
-
}
|
|
480
|
-
if (size) {
|
|
481
|
-
css = _extends({}, css, ICONS_SIZE[size]);
|
|
482
|
-
}
|
|
456
|
+
css.fontSize = reactCrudUtils.Utils.nvl(buttonLabel.fontSize, css.fontSize);
|
|
483
457
|
return css;
|
|
484
458
|
});
|
|
485
459
|
return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableHighlight, {
|
|
@@ -494,7 +468,7 @@ function UIButton(props) {
|
|
|
494
468
|
name: icon
|
|
495
469
|
})
|
|
496
470
|
}), label && /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
497
|
-
style:
|
|
471
|
+
style: buttonLabel,
|
|
498
472
|
children: label
|
|
499
473
|
})]
|
|
500
474
|
})
|