From 46ae9a3494f350b3b574b0e48334430bad468166 Mon Sep 17 00:00:00 2001
From: Javi Aguilar <122741+itsjavi@users.noreply.github.com>
Date: Mon, 4 Sep 2023 01:56:11 +0200
Subject: [PATCH] refactor: use individial lucide icons
---
packages/storylite/assets/lucide/LICENSE | 15 +++++++++++++
.../storylite/assets/lucide/svg/x-circle.json | 21 +++++++++++++++++++
.../storylite/assets/lucide/svg/x-circle.svg | 15 +++++++++++++
.../components/addons/getToolbarAddons.tsx | 5 +++--
4 files changed, 54 insertions(+), 2 deletions(-)
create mode 100644 packages/storylite/assets/lucide/LICENSE
create mode 100644 packages/storylite/assets/lucide/svg/x-circle.json
create mode 100644 packages/storylite/assets/lucide/svg/x-circle.svg
diff --git a/packages/storylite/assets/lucide/LICENSE b/packages/storylite/assets/lucide/LICENSE
new file mode 100644
index 0000000..325e8ff
--- /dev/null
+++ b/packages/storylite/assets/lucide/LICENSE
@@ -0,0 +1,15 @@
+ISC License
+
+Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/packages/storylite/assets/lucide/svg/x-circle.json b/packages/storylite/assets/lucide/svg/x-circle.json
new file mode 100644
index 0000000..5ba9ba7
--- /dev/null
+++ b/packages/storylite/assets/lucide/svg/x-circle.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "../icon.schema.json",
+ "contributors": ["colebemis", "ericfennis"],
+ "tags": [
+ "cancel",
+ "close",
+ "delete",
+ "remove",
+ "times",
+ "clear",
+ "error",
+ "incorrect",
+ "wrong",
+ "mistake",
+ "failure",
+ "linter",
+ "multiply",
+ "multiplication"
+ ],
+ "categories": ["maths", "shapes", "development"]
+}
diff --git a/packages/storylite/assets/lucide/svg/x-circle.svg b/packages/storylite/assets/lucide/svg/x-circle.svg
new file mode 100644
index 0000000..e210b2d
--- /dev/null
+++ b/packages/storylite/assets/lucide/svg/x-circle.svg
@@ -0,0 +1,15 @@
+
diff --git a/packages/storylite/src/components/addons/getToolbarAddons.tsx b/packages/storylite/src/components/addons/getToolbarAddons.tsx
index bcfb03b..ba1928f 100644
--- a/packages/storylite/src/components/addons/getToolbarAddons.tsx
+++ b/packages/storylite/src/components/addons/getToolbarAddons.tsx
@@ -7,9 +7,10 @@ import {
MonitorSmartphoneIcon,
MoonIcon,
SunIcon,
- XCircleIcon,
} from 'lucide-react'
+import xCircleIcon from '@/assets/lucide/svg/x-circle.svg'
+import { InlineHtml } from '@/components/InlineHtml'
import { getStoryUrl } from '@/services/csf-api/navigation'
import {
@@ -152,7 +153,7 @@ function getDefaultRightToolbarAddons(): AddonSetup[] {
{
tooltip: 'Toggle maximized view',
defaultContent: ,
- activeContent: ,
+ activeContent: {xCircleIcon},
placement,
stateful: true,
persistent: true,