From ce5f8f5e3fb259e9b5be13a1afecb37545519a79 Mon Sep 17 00:00:00 2001 From: Joshua Date: Wed, 19 Oct 2022 23:58:03 +0200 Subject: [PATCH] introduce note icon (broken) --- components/Icon.tsx | 15 ++- public/icons/icons.svg | 204 +++++++++++++++++++++++++++++++++++++++++ public/icons/note.svg | 20 ++++ utils/types.ts | 3 +- 4 files changed, 239 insertions(+), 3 deletions(-) create mode 100644 public/icons/icons.svg create mode 100644 public/icons/note.svg diff --git a/components/Icon.tsx b/components/Icon.tsx index 299a3c9..6cba024 100644 --- a/components/Icon.tsx +++ b/components/Icon.tsx @@ -1,9 +1,20 @@ import { Icon } from "utils/types"; -const Icon = ({icon, className}: {icon: Icon, className?:string}) => { +const Icon = ({ icon, className }: { icon: Icon, className?: string }) => { + let link; + switch (icon) { + case "note": + link = "/icons/note.svg" + break; + + default: + link = `/icons/icons.svg#${icon}` + break; + } + return ( - + ) } diff --git a/public/icons/icons.svg b/public/icons/icons.svg new file mode 100644 index 0000000..0dfa8e7 --- /dev/null +++ b/public/icons/icons.svg @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/icons/note.svg b/public/icons/note.svg new file mode 100644 index 0000000..6e45012 --- /dev/null +++ b/public/icons/note.svg @@ -0,0 +1,20 @@ + diff --git a/utils/types.ts b/utils/types.ts index 003bed9..87e167c 100644 --- a/utils/types.ts +++ b/utils/types.ts @@ -25,4 +25,5 @@ export type Icon = | "arrow-up-right" | "arrow-right" | "spotify" - | "arrow-right"; + | "arrow-right" + | "note"