aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2023-11-02 15:32:43 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2024-03-15 19:19:33 +0100
commit24d5f884978485ad09aa05e8d8deac15cec7bea1 (patch)
tree1e8bf0a02c839dc7b5f5232efebf6e54469bb9cc /src/components
parentSpeed up build with swcMinify (diff)
downloadblog-24d5f884978485ad09aa05e8d8deac15cec7bea1.tar.gz
blog-24d5f884978485ad09aa05e8d8deac15cec7bea1.tar.zst
blog-24d5f884978485ad09aa05e8d8deac15cec7bea1.zip
Formatting with prettier
Diffstat (limited to 'src/components')
-rw-r--r--src/components/icons.tsx20
-rw-r--r--src/components/icons/fediverse.ts4
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
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;
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 */