react-crud-mobile 1.0.921 → 1.0.923
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 +3 -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 +3 -31
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/elements/core/UIButton.tsx +8 -28
|
@@ -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,27 +448,11 @@ 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
|
});
|
|
475
453
|
var buttonLabel = style('buttonLabel');
|
|
476
454
|
var iconStyle = reactCrudUtils.Utils.call(function () {
|
|
477
455
|
var css = style('buttonIcon', extra.icon);
|
|
478
|
-
if (variant === 'text') {
|
|
479
|
-
css.color = 'text';
|
|
480
|
-
}
|
|
481
|
-
if (size) {
|
|
482
|
-
css = _extends({}, css, ICONS_SIZE[size]);
|
|
483
|
-
}
|
|
484
456
|
css.fontSize = reactCrudUtils.Utils.nvl(buttonLabel.fontSize, css.fontSize);
|
|
485
457
|
return css;
|
|
486
458
|
});
|
|
@@ -491,7 +463,7 @@ function UIButton(props) {
|
|
|
491
463
|
children: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
492
464
|
children: [icon && /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
493
465
|
children: /*#__PURE__*/jsxRuntime.jsx(vectorIcons.Ionicons, {
|
|
494
|
-
size: 30,
|
|
466
|
+
size: reactCrudUtils.Utils.nvl(element.iconSize, 30),
|
|
495
467
|
style: iconStyle,
|
|
496
468
|
name: icon
|
|
497
469
|
})
|