aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/icons.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/icons.tsx')
-rw-r--r--src/components/icons.tsx20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/components/icons.tsx b/src/components/icons.tsx
index 5f3b40f..402b622 100644
--- a/src/components/icons.tsx
+++ b/src/components/icons.tsx
@@ -5,19 +5,11 @@
5 */ 5 */
6 6
7import { useId } from 'react'; 7import { useId } from 'react';
8import { 8import { siGithub, siGooglescholar, siLinkedin, siOrcid } from 'simple-icons';
9 siGithub,
10 siGooglescholar,
11 siLinkedin,
12 siOrcid,
13} from 'simple-icons';
14 9
15import fediverse from './icons/fediverse'; 10import fediverse from './icons/fediverse';
16 11
17export function Icon({ path, alt }: { 12export function Icon({ path, alt }: { path: string; alt: string }) {
18 path: string;
19 alt: string;
20}) {
21 const titleId = useId(); 13 const titleId = useId();
22 14
23 return ( 15 return (
@@ -33,12 +25,16 @@ export function Icon({ path, alt }: {
33 > 25 >
34 <path fill="currentColor" d={path} /> 26 <path fill="currentColor" d={path} />
35 </svg> 27 </svg>
36 <span className="sr-only" id={titleId}>{alt}</span> 28 <span className="sr-only" id={titleId}>
29 {alt}
30 </span>
37 </> 31 </>
38 ); 32 );
39} 33}
40 34
41export function SimpleIcon({ icon: { path, title } }: { 35export function SimpleIcon({
36 icon: { path, title },
37}: {
42 icon: { 38 icon: {
43 path: string; 39 path: string;
44 title: string; 40 title: string;