diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/icons.tsx | 20 | ||||
-rw-r--r-- | src/components/icons/fediverse.ts | 4 |
2 files changed, 10 insertions, 14 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 | ||
7 | import { useId } from 'react'; | 7 | import { useId } from 'react'; |
8 | import { | 8 | import { siGithub, siGooglescholar, siLinkedin, siOrcid } from 'simple-icons'; |
9 | siGithub, | ||
10 | siGooglescholar, | ||
11 | siLinkedin, | ||
12 | siOrcid, | ||
13 | } from 'simple-icons'; | ||
14 | 9 | ||
15 | import fediverse from './icons/fediverse'; | 10 | import fediverse from './icons/fediverse'; |
16 | 11 | ||
17 | export function Icon({ path, alt }: { | 12 | export 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 | ||
41 | export function SimpleIcon({ icon: { path, title } }: { | 35 | export function SimpleIcon({ |
36 | icon: { path, title }, | ||
37 | }: { | ||
42 | icon: { | 38 | icon: { |
43 | path: string; | 39 | path: string; |
44 | title: string; | 40 | title: string; |
diff --git a/src/components/icons/fediverse.ts b/src/components/icons/fediverse.ts index b1dec2c..5bc694a 100644 --- a/src/components/icons/fediverse.ts +++ b/src/components/icons/fediverse.ts | |||
@@ -3,10 +3,10 @@ | |||
3 | * SPDX-FileCopyrightText: 2023 Kristóf Marussy <kristof@marussy.com> | 3 | * SPDX-FileCopyrightText: 2023 Kristóf Marussy <kristof@marussy.com> |
4 | * | 4 | * |
5 | * SPDX-License-Identifier: CC0-1.0 | 5 | * SPDX-License-Identifier: CC0-1.0 |
6 | * | 6 | * |
7 | * This icon is based on the Fediverse logo proposal (mono version) SVG by Eukombos at | 7 | * This icon is based on the Fediverse logo proposal (mono version) SVG by Eukombos at |
8 | * https://commons.wikimedia.org/w/index.php?title=File:Fediverse_logo_proposal_(mono_version).svg&oldid=794518552 | 8 | * https://commons.wikimedia.org/w/index.php?title=File:Fediverse_logo_proposal_(mono_version).svg&oldid=794518552 |
9 | * | 9 | * |
10 | * The paths in the original SVG were merged into a single path and | 10 | * The paths in the original SVG were merged into a single path and |
11 | * the drawing was resized to match the "0 0 24 24" viewbox of Simple Icons. | 11 | * the drawing was resized to match the "0 0 24 24" viewbox of Simple Icons. |
12 | */ | 12 | */ |