diff --git a/apps/new/widget/components/project/ProfileCard.jsx b/apps/new/widget/components/project/ProfileCard.jsx new file mode 100644 index 00000000..52216fe5 --- /dev/null +++ b/apps/new/widget/components/project/ProfileCard.jsx @@ -0,0 +1,98 @@ +const MutedText = styled.span` + color: #818181; + + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 20px; /* 125% */ +`; + +const AccountName = styled.span` + color: #818181; + font-size: 16px; + font-style: normal; + font-weight: 500; + line-height: 20px; + + max-width: 30ch; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +`; + +const ProfileCard = (props) => { + const accountId = props.accountId ?? context.accountId; + const link = props.link ?? true; + // const hideAccountId = props.hideAccountId; + // const hideName = props.hideName; + const hideImage = props.hideImage; + const iconOnly = props.iconOnly; + const openLinkInNewTab = props.openLinkInNewTab ?? false; + + const profile = props.profile ?? Social.getr(`${accountId}/profile`); + + const name = profile.name ?? accountId; + const title = props.title ?? `${name} @${accountId}`; + const tooltip = + props.tooltip && (props.tooltip === true ? title : props.tooltip); + + let inner = ( +