mirror of
https://github.com/hex248/sprint.git
synced 2026-02-07 18:23:03 +00:00
another stab at fixing the OrgIcon sizing
This commit is contained in:
@@ -62,17 +62,30 @@ export default function OrgIcon({
|
|||||||
"flex items-center justify-center rounded-sm overflow-hidden",
|
"flex items-center justify-center rounded-sm overflow-hidden",
|
||||||
"text-white font-medium select-none",
|
"text-white font-medium select-none",
|
||||||
!iconURL && backgroundClass,
|
!iconURL && backgroundClass,
|
||||||
`w-${size || 6}`,
|
|
||||||
`h-${size || 6}`,
|
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
|
style={{ width: `calc(var(--spacing) * ${size || 6})`, height: `calc(var(--spacing) * ${size || 6})` }}
|
||||||
>
|
>
|
||||||
{iconURL ? (
|
{iconURL ? (
|
||||||
<img src={iconURL} alt={name} className={`rounded-md object-cover w-${size || 6} h-${size || 6}`} />
|
<img
|
||||||
|
src={iconURL}
|
||||||
|
alt={name}
|
||||||
|
className={`rounded-md object-cover`}
|
||||||
|
style={{
|
||||||
|
width: `calc(var(--spacing) * ${size || 6})`,
|
||||||
|
height: `calc(var(--spacing) * ${size || 6})`,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div className={cn("flex items-center justify-center", `w-${size || 6}`, `h-${size || 6}`)}>
|
<span
|
||||||
<span className={cn("", textClass)}>{getInitials(name)}</span>
|
className={cn("flex items-center justify-center", textClass)}
|
||||||
</div>
|
style={{
|
||||||
|
width: `calc(var(--spacing) * ${size || 6})`,
|
||||||
|
height: `calc(var(--spacing) * ${size || 6})`,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{getInitials(name)}
|
||||||
|
</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user