@corva/ui 0.35.0-4 → 0.35.0-5
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 e from"@babel/runtime/helpers/defineProperty";import o from"classnames";import{makeStyles as t}from"@material-ui/core";import{isNativeDetected as i}from"../../../utils/mobileDetect.js";import{getIconForFeedItemType as r,AVATAR_ICON as a}from"../../../utils/feed.js";import{FEED_ITEM_TYPES_BY_KEY as m}from"../../../constants/feed.js";import{ALERT_LEVEL_COLOR as n}from"../../../constants/alerts.js";import l from"./AvatarIcon.js";import{jsx as d}from"react/jsx-runtime";var c=t({icon:{width:32,height:32,backgroundColor:"grey",borderRadius:23,position:"absolute",top:
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import o from"classnames";import{makeStyles as t}from"@material-ui/core";import{isNativeDetected as i}from"../../../utils/mobileDetect.js";import{getIconForFeedItemType as r,AVATAR_ICON as a}from"../../../utils/feed.js";import{FEED_ITEM_TYPES_BY_KEY as m}from"../../../constants/feed.js";import{ALERT_LEVEL_COLOR as n}from"../../../constants/alerts.js";import l from"./AvatarIcon.js";import{jsx as d}from"react/jsx-runtime";var c=t({icon:{width:32,height:32,backgroundColor:"grey",borderRadius:23,position:"absolute",top:18,left:-21,padding:6},iconWrapper:{display:"inline-block",height:20,width:20,overflow:"hidden"},iconImg:{height:20,width:20},iconNative:{left:"auto"}}),s=function(t){var r,a=t.feedItem,l=t.feedItemType,s=t.icon,p=c(),f=m[l]?m[l].label:"Other";if(l===m.alert.type){var u,h,v=null===(u=a.context)||void 0===u||null===(h=u.alert)||void 0===h?void 0:h.level;r={backgroundColor:n[v]}}return d("div",{className:o(p.icon,e({},p.iconNative,i)),style:r,children:d("div",{className:p.iconWrapper,children:d("img",{src:s,alt:"".concat(f," icon"),className:p.iconImg})})})},p=function(e){var o=e.feedItem,t=e.displayName,i=e.isRecommended,m=o.type,n=r(m);return n===a?d(l,{displayName:t,feedItem:o,isRecommended:i}):d(s,{icon:n,feedItem:o,feedItemType:m})};export{p as default};
|