-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adds link to github profile #7142
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import * as RadixAvatar from '@radix-ui/react-avatar'; | ||
import type { FC } from 'react'; | ||
|
||
import Link from '@/components/Link'; | ||
|
||
import styles from './index.module.css'; | ||
|
||
export type AvatarProps = { | ||
|
@@ -11,16 +13,18 @@ export type AvatarProps = { | |
|
||
const Avatar: FC<AvatarProps> = ({ src, alt, fallback }) => ( | ||
<RadixAvatar.Root className={styles.avatarRoot}> | ||
<RadixAvatar.Image | ||
loading="lazy" | ||
src={src} | ||
alt={alt} | ||
title={alt} | ||
className={styles.avatar} | ||
/> | ||
<RadixAvatar.Fallback delayMs={500} className={styles.avatar}> | ||
{fallback} | ||
</RadixAvatar.Fallback> | ||
<Link href={`https://github.com/${alt}`}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On some pages, such as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good call. i think we should continue to pursue #7143 instead |
||
<RadixAvatar.Image | ||
loading="lazy" | ||
src={src} | ||
alt={alt} | ||
title={alt} | ||
className={styles.avatar} | ||
/> | ||
<RadixAvatar.Fallback delayMs={500} className={styles.avatar}> | ||
{fallback} | ||
</RadixAvatar.Fallback> | ||
</Link> | ||
</RadixAvatar.Root> | ||
); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RadixAvatar.Root
becomes aspan
. I don't think it matters from a DOM validation part which is outer-most - so I left Root, root. It also worked moving all the styles to the Link when I briefly had that as the root.