@useblu/ocean-react 1.59.2 → 1.60.0
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/CHANGELOG.md +6 -0
- package/Tag/Tag.d.ts +12 -7
- package/Tag/Tag.d.ts.map +1 -1
- package/index.es.js +8 -2
- package/index.es.js.map +1 -1
- package/index.js +8 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -262,8 +262,14 @@ var TagIcon = e__default["default"].memo(function (_a) {
|
|
|
262
262
|
TagIcon.displayName = 'TagIcon';
|
|
263
263
|
|
|
264
264
|
var Tag = e__default["default"].forwardRef(function (_a, ref) {
|
|
265
|
-
var children = _a.children, _b = _a.
|
|
266
|
-
|
|
265
|
+
var children = _a.children, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, _c = _a.type, type = _c === void 0 ? 'default' : _c, _d = _a.size, size = _d === void 0 ? 'medium' : _d, className = _a.className, icon = _a.icon, _e = _a.setIconOff, setIconOff = _e === void 0 ? false : _e, rest = __rest$2(_a, ["children", "variant", "type", "size", "className", "icon", "setIconOff"]);
|
|
266
|
+
var hasIcon = (type === 'positive' ||
|
|
267
|
+
type === 'warning' ||
|
|
268
|
+
type === 'negative' ||
|
|
269
|
+
icon) &&
|
|
270
|
+
!setIconOff;
|
|
271
|
+
var isHighlight = variant === 'highlight';
|
|
272
|
+
return (e__default["default"].createElement("div", __assign$2({ ref: ref, role: "Tag", className: classNames('ods-tag', "ods-tag--".concat(size), hasIcon && "ods-tag--".concat(size, "__with-icon"), isHighlight ? "ods-tag--".concat(variant, "__").concat(type) : "ods-tag--".concat(type), className) }, rest),
|
|
267
273
|
!setIconOff && e__default["default"].createElement(TagIcon, { type: type, icon: icon }),
|
|
268
274
|
e__default["default"].createElement("div", { className: "ods-tag__content" }, children)));
|
|
269
275
|
});
|