Skip to content

Commit

Permalink
Add option to remove button docline
Browse files Browse the repository at this point in the history
  • Loading branch information
thordurhhh committed Jun 13, 2024
1 parent b7c74b8 commit 15a573b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const NotificationLine = ({ data, onClickCallback }: Props) => {
<AvatarImage
img={data.sender.logoUrl}
background={!isRead ? 'white' : 'blue100'}
ariaLabel="Sender"
as="div"
imageClass={styles.img}
/>
) : undefined}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface Props {
avatar?: ReactNode
onClick?: (event: MouseEvent<HTMLElement>) => void
large?: boolean
ariaLabel?: string
as?: 'div' | 'button'
imageClass?: string
}

Expand All @@ -23,7 +23,7 @@ export const AvatarImage: FC<Props> = ({
avatar,
large,
imageClass,
ariaLabel,
as = 'button',
onClick,
}) => {
const { formatMessage } = useLocale()
Expand All @@ -42,8 +42,12 @@ export const AvatarImage: FC<Props> = ({
className={cn(styles.imageContainer, {
[styles.largeAvatar]: large,
})}
component="button"
aria-label={ariaLabel ?? formatMessage(messages.markAsBulkSelection)}
component={as}
aria-label={
as === 'button'
? formatMessage(messages.markAsBulkSelection)
: undefined
}
onClick={onClick}
>
{avatar ? (
Expand Down

0 comments on commit 15a573b

Please sign in to comment.