diff options
author | Kristóf Marussy <kristof@marussy.com> | 2023-11-02 15:32:43 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2024-03-15 19:19:33 +0100 |
commit | 24d5f884978485ad09aa05e8d8deac15cec7bea1 (patch) | |
tree | 1e8bf0a02c839dc7b5f5232efebf6e54469bb9cc /src/components/icons.tsx | |
parent | Speed up build with swcMinify (diff) | |
download | blog-24d5f884978485ad09aa05e8d8deac15cec7bea1.tar.gz blog-24d5f884978485ad09aa05e8d8deac15cec7bea1.tar.zst blog-24d5f884978485ad09aa05e8d8deac15cec7bea1.zip |
Formatting with prettier
Diffstat (limited to 'src/components/icons.tsx')
-rw-r--r-- | src/components/icons.tsx | 20 |
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 | ||
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; |