mirror of
https://github.com/skidoodle/albert.lol.git
synced 2025-02-15 06:09:15 +01:00
.fix? aria-labels
This commit is contained in:
parent
e9861b3bcc
commit
1c145ff451
1 changed files with 10 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import toast from 'react-hot-toast';
|
import toast from 'react-hot-toast';
|
||||||
import copy from 'copy-to-clipboard';
|
import copy from 'copy-to-clipboard';
|
||||||
|
import { socials } from '@/components/data/Socials';
|
||||||
|
|
||||||
type Icon = {
|
type Icon = {
|
||||||
children: any;
|
children: any;
|
||||||
|
@ -25,6 +26,9 @@ export const Icon = ({ children, reference, copyValue }: Icon) => {
|
||||||
<Link
|
<Link
|
||||||
href={''}
|
href={''}
|
||||||
className={`cursor-pointer`}
|
className={`cursor-pointer`}
|
||||||
|
aria-label={
|
||||||
|
socials.find((social) => social.ref === reference)?.ariaLabel
|
||||||
|
}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
notify(), copy(reference);
|
notify(), copy(reference);
|
||||||
}}
|
}}
|
||||||
|
@ -35,7 +39,12 @@ export const Icon = ({ children, reference, copyValue }: Icon) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link href={reference} target='_blank' className={'cursor-pointer'}>
|
<Link
|
||||||
|
href={reference}
|
||||||
|
target='_blank'
|
||||||
|
className={'cursor-pointer'}
|
||||||
|
aria-label={socials.find((social) => social.ref === reference)?.ariaLabel}
|
||||||
|
>
|
||||||
{children}
|
{children}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue