From e29a8dee7b5e9eea82d872749986848f7f43be70 Mon Sep 17 00:00:00 2001 From: Jean Tinland Date: Tue, 6 Aug 2024 21:54:48 +0200 Subject: [PATCH] Use lazy loaded icon in side icon --- lib/components/icons/icons.jsx | 1 + lib/components/icons/library/apple.jsx | 9 +++++++++ lib/components/side-icon.jsx | 13 +++++-------- 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 lib/components/icons/library/apple.jsx diff --git a/lib/components/icons/icons.jsx b/lib/components/icons/icons.jsx index 95e361cd..5375bcab 100644 --- a/lib/components/icons/icons.jsx +++ b/lib/components/icons/icons.jsx @@ -26,6 +26,7 @@ export const AndroidStudio = React.lazy(() => export const Anki = React.lazy(() => import("./library/anki.jsx")); export const Anytype = React.lazy(() => import("./library/anytype.jsx")); export const AppStore = React.lazy(() => import("./library/app-store.jsx")); +export const Apple = React.lazy(() => import("./library/apple.jsx")); export const Arc = React.lazy(() => import("./library/arc.jsx")); export const Atom = React.lazy(() => import("./library/atom.jsx")); export const Audacity = React.lazy(() => import("./library/audacity.jsx")); diff --git a/lib/components/icons/library/apple.jsx b/lib/components/icons/library/apple.jsx new file mode 100644 index 00000000..dc8ffe89 --- /dev/null +++ b/lib/components/icons/library/apple.jsx @@ -0,0 +1,9 @@ +import Icon from "../icon.jsx"; + +export default function Apple(props) { + return ( + + + + ); +} diff --git a/lib/components/side-icon.jsx b/lib/components/side-icon.jsx index 33ac7def..7387ba38 100644 --- a/lib/components/side-icon.jsx +++ b/lib/components/side-icon.jsx @@ -1,4 +1,6 @@ import * as Uebersicht from "uebersicht"; +import * as Icons from "./icons/icons.jsx"; +import { SuspenseIcon } from "./icons/icon.jsx"; import { useSimpleBarContext } from "./simple-bar-context.jsx"; const { React } = Uebersicht; @@ -13,14 +15,9 @@ export function Component() { return (
- - - + + +
); }