UNPKG

carbon-react

Version:

A library of reusable React components for easily building user interfaces.

2 lines (1 loc) 1.85 kB
"use strict";require("react");var e=require("styled-components"),i=require("styled-system"),t=require("../icon/icon.component.js"),r=require("../profile/profile.config.js"),o=require("../../style/themes/apply-base-theme.js"),n=require("./portrait.config.js"),s=require("./__internal__/get-colors.js");function d(e){return e&&e.__esModule?e:{default:e}}var a=d(e);const l=a.default.div.withConfig({displayName:"portrait.style__StyledPortraitInitials",componentId:"sc-db9324dd-0"})(["font-weight:500;font-size:",";display:flex;white-space:nowrap;align-items:center;justify-content:center;height:inherit;width:inherit;"],(({size:e})=>r.default[e].initialSize)),c=a.default.img.withConfig({displayName:"portrait.style__StyledCustomImg",componentId:"sc-db9324dd-1"})(["height:inherit;min-width:inherit;"]),p=a.default(t.default).withConfig({displayName:"portrait.style__StyledIcon",componentId:"sc-db9324dd-2"})(["&&{color:inherit;height:inherit;min-width:inherit;::before{font-size:","px;}}"],(({size:e})=>n.PORTRAIT_SIZE_PARAMS[e].iconDimensions)),u=a.default.div.attrs(o.default).withConfig({displayName:"portrait.style__StyledPortraitContainer",componentId:"sc-db9324dd-3"})(["",";"," min-width:","px;height:","px;overflow:hidden;border-radius:",";border:1px solid var(--colorsUtilityReadOnly600);display:inline-block;"," ",""],(({darkBackground:e,backgroundColor:i,size:t,foregroundColor:r})=>s.default(i,e,!["XS","S"].includes(t),!0,r)),(({hasValidImg:e,size:i})=>e&&`max-width: ${n.PORTRAIT_SIZE_PARAMS[i].dimensions}px;`),(({size:e})=>n.PORTRAIT_SIZE_PARAMS[e].dimensions),(({size:e})=>n.PORTRAIT_SIZE_PARAMS[e].dimensions),(({shape:e})=>"square"===e?"0px":"var(--borderRadiusCircle)"),(({onClick:e})=>e&&"cursor: pointer"),i.margin);exports.StyledCustomImg=c,exports.StyledIcon=p,exports.StyledPortraitContainer=u,exports.StyledPortraitInitials=l;