The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fixed avatar font weight and associated story (#12989)
Lucas Bordeau76c517aa2963
diff --git a/packages/twenty-ui/src/display/avatar/components/Avatar.tsx b/packages/twenty-ui/src/display/avatar/components/Avatar.tsxindex 5adc94db1ce..d02f0f87235 100644--- a/packages/twenty-ui/src/display/avatar/components/Avatar.tsx+++ b/packages/twenty-ui/src/display/avatar/components/Avatar.tsx@@ -51,6 +51,12 @@ const StyledImage = styled.img`width: 100%;`;+const StyledPlaceholderChar = styled.span<{+ fontWeight: number;+}>`+ font-weight: ${({ fontWeight }) => fontWeight};+`;+export type AvatarProps = {avatarUrl?: string | null;className?: string;@@ -132,7 +138,9 @@ export const Avatar = ({size={theme.icon.size.xl}/>) : showPlaceholder ? (- placeholderChar+ <StyledPlaceholderChar fontWeight={theme.font.weight.medium}>+ {placeholderChar}+ </StyledPlaceholderChar>) : (<StyledImage src={avatarImageURI} onError={handleImageError} alt="" />)}diff --git a/packages/twenty-ui/src/display/avatar/components/__stories__/Avatar.stories.tsx b/packages/twenty-ui/src/display/avatar/components/__stories__/Avatar.stories.tsxindex 5818b698003..570a14c9bd1 100644--- a/packages/twenty-ui/src/display/avatar/components/__stories__/Avatar.stories.tsx+++ b/packages/twenty-ui/src/display/avatar/components/__stories__/Avatar.stories.tsx@@ -15,7 +15,7 @@ const meta: Meta<typeof Avatar> = {args: {avatarUrl: AVATAR_URL_MOCK,size: 'md',- placeholder: 'L',+ placeholder: 'E',type: 'rounded',},};