ywana-core8 0.0.754 → 0.0.756
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/index.cjs +13 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +13 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +13 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/chip.js +13 -4
package/dist/index.umd.js
CHANGED
@@ -505,10 +505,12 @@
|
|
505
505
|
var id = props.id,
|
506
506
|
icon = props.icon,
|
507
507
|
label = props.label,
|
508
|
+
tooltip = props.tooltip,
|
508
509
|
action = props.action,
|
509
510
|
outlined = props.outlined,
|
510
511
|
selected = props.selected,
|
511
|
-
onSelect = props.onSelect
|
512
|
+
onSelect = props.onSelect,
|
513
|
+
className = props.className;
|
512
514
|
|
513
515
|
function select(event) {
|
514
516
|
event.stopPropagation();
|
@@ -518,8 +520,16 @@
|
|
518
520
|
|
519
521
|
var style = outlined ? "outlined" : "normal";
|
520
522
|
if (selected) style = style + " selected";
|
521
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
522
|
-
className: "chip " + style,
|
523
|
+
return tooltip ? /*#__PURE__*/React__default["default"].createElement(Tooltip, tooltip, /*#__PURE__*/React__default["default"].createElement("div", {
|
524
|
+
className: "chip " + className + " " + style,
|
525
|
+
onClick: select
|
526
|
+
}, icon ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
527
|
+
icon: icon,
|
528
|
+
size: "small"
|
529
|
+
}) : null, /*#__PURE__*/React__default["default"].createElement("main", null, /*#__PURE__*/React__default["default"].createElement(Text, null, label)), action ? /*#__PURE__*/React__default["default"].createElement("span", {
|
530
|
+
className: "meta"
|
531
|
+
}, action) : null)) : /*#__PURE__*/React__default["default"].createElement("div", {
|
532
|
+
className: "chip " + className + " " + style,
|
523
533
|
onClick: select
|
524
534
|
}, icon ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
525
535
|
icon: icon,
|