Skip to content

Commit

Permalink
handle icon only
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelfact committed Nov 22, 2024
1 parent dbd8a0b commit 70d73d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function ContributorProfileExtended({ user, headerProps, footerContent }:
<div className={"flex w-full flex-row items-center justify-between gap-1"}>
<div className={"flex flex-1 flex-row flex-wrap items-center gap-md"}>
{contributor.contacts.map(contact => (
<SocialContact key={contact.contact} contact={contact} />
<SocialContact key={contact.contact} contact={contact} buttonProps={{ iconOnly: true }} />
))}
</div>

Expand Down
3 changes: 1 addition & 2 deletions shared/features/social/social-contact/social-contact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { Translate } from "@/shared/translation/components/translate/translate";

export function SocialContact({ contact, buttonProps }: SocialContactProps) {
const socialKernelPort = bootstrap.getSocialKernelPort();
const isIconOnly = buttonProps?.iconOnly === undefined ? true : buttonProps.iconOnly;

function handleCopy(url: string) {
copy(url);
Expand All @@ -35,7 +34,7 @@ export function SocialContact({ contact, buttonProps }: SocialContactProps) {

return (
<Button variant={"secondary"} size={"sm"} {...buttonProps} {...args} startIcon={{ component: icon }}>
{!isIconOnly ? label : null}
{label}
</Button>
);
}

0 comments on commit 70d73d5

Please sign in to comment.