@corva/ui 0.26.0-3 → 0.26.0-4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{isEmpty as e}from"lodash";import{jsxs as t,Fragment as r,jsx as i}from"react/jsx-runtime";import{makeStyles as n,Chip as a,Tooltip as l}from"@material-ui/core";import o from"prop-types";import m from"../TruncatedText/index.js";import c from"@babel/runtime/helpers/toArray";var s=n({assetsCount:{maxWidth:168,whiteSpace:"nowrap"},countChip:{marginLeft:8}}),p=function(n){var o=n.items,p=n.limit,h=s(),u=c(o),d=u[0],f=u.slice(1);return e(o)?null:t(r,{children:[i(a,{label:i("div",{className:h.assetsCount,children:i(m,{children:d})})}),o.length>1&&i(l,{title:i("div",{children:f.map((function(e,r){return t("div",{children:[e,"".concat(r<f.length-1?",":"")]},e)}))}),children:i(a,{label:o.length<=p?"+".concat(o.length-1):"".concat(p-1,"+"),className:h.countChip})})]})};p.propTypes={items:o.arrayOf(o.shape({})).isRequired,limit:o.number},p.defaultProps={limit:100};export default p;
|