From 724b29734dfcd80ce7f5504b75cd8ec4f1f9671b Mon Sep 17 00:00:00 2001 From: fran-ink <171171801+fran-ink@users.noreply.github.com> Date: Wed, 5 Feb 2025 14:28:58 -0500 Subject: [PATCH] feat: update icons --- scripts/import-svgs.mjs | 107 ++++++++++++------ src/icons/AllIcons.css | 27 +++++ src/icons/AllIcons.tsx | 76 +++++++++++-- src/icons/Apps.svg | 3 + src/icons/Arrow.svg | 3 + src/icons/Bridge.svg | 5 + src/icons/Check.svg | 3 + src/icons/CheckBadge.svg | 3 + .../{Type=CheckFill.svg => CheckFill.svg} | 0 src/icons/Chevron.svg | 3 + src/icons/Close.svg | 3 + src/icons/CloseSmall.svg | 3 + src/icons/Code.svg | 5 + src/icons/Copy.svg | 3 + src/icons/Deposit.svg | 4 + .../{Type=Disconnect.svg => Disconnect.svg} | 0 src/icons/Dots.svg | 3 + src/icons/{Type=Error.svg => Error.svg} | 0 src/icons/History.svg | 3 + src/icons/Home.svg | 3 + src/icons/Info.svg | 5 + src/icons/{Type=InkLogo.svg => InkLogo.svg} | 0 src/icons/{Type=Loading.svg => Loading.svg} | 0 src/icons/Logo/Ink.svg | 3 + src/icons/Logo/Placeholder.svg | 23 ++++ src/icons/Logo/index.ts | 6 + src/icons/Mail.svg | 4 + src/icons/Menu.svg | 3 + src/icons/Minus.svg | 3 + src/icons/Moon.svg | 3 + src/icons/{Type=Minus.svg => Page/One.svg} | 2 +- src/icons/Page/Three.svg | 5 + src/icons/Page/Two.svg | 4 + src/icons/Page/index.ts | 7 ++ src/icons/Panel.svg | 3 + src/icons/Plus.svg | 4 + src/icons/Profile.svg | 3 + src/icons/Search.svg | 3 + src/icons/Settings.svg | 3 + .../Discord.svg} | 0 src/icons/Social/Farcaster.svg | 3 + .../Github.svg} | 0 src/icons/Social/Mirror.svg | 10 ++ src/icons/Social/Telegram.svg | 10 ++ src/icons/Social/X.svg | 3 + src/icons/Social/index.ts | 10 ++ src/icons/{Type=Sun.svg => Sun.svg} | 0 src/icons/Swap.svg | 4 + src/icons/Type=Arrow.svg | 3 - src/icons/Type=Check.svg | 3 - src/icons/Type=Chevron.svg | 3 - src/icons/Type=Close.svg | 4 - src/icons/Type=Copy.svg | 3 - src/icons/Type=DefaultAppIcon.svg | 23 ---- src/icons/Type=Deposit.svg | 3 - src/icons/Type=History.svg | 4 - src/icons/Type=Home.svg | 3 - src/icons/Type=Menu.svg | 4 - src/icons/Type=Moon.svg | 3 - src/icons/Type=Profile.svg | 3 - src/icons/Type=Search.svg | 3 - src/icons/Type=Settings.svg | 3 - src/icons/Type=SocialX.svg | 3 - src/icons/Type=Success.svg | 3 - src/icons/Type=Swap.svg | 3 - src/icons/Users.svg | 3 + src/icons/{Type=Wallet.svg => Wallet.svg} | 2 +- src/icons/index.ts | 63 ++++++----- src/layout/InkLayout/InkLayout.tsx | 3 +- 69 files changed, 381 insertions(+), 145 deletions(-) create mode 100644 src/icons/AllIcons.css create mode 100644 src/icons/Apps.svg create mode 100644 src/icons/Arrow.svg create mode 100644 src/icons/Bridge.svg create mode 100644 src/icons/Check.svg create mode 100644 src/icons/CheckBadge.svg rename src/icons/{Type=CheckFill.svg => CheckFill.svg} (100%) create mode 100644 src/icons/Chevron.svg create mode 100644 src/icons/Close.svg create mode 100644 src/icons/CloseSmall.svg create mode 100644 src/icons/Code.svg create mode 100644 src/icons/Copy.svg create mode 100644 src/icons/Deposit.svg rename src/icons/{Type=Disconnect.svg => Disconnect.svg} (100%) create mode 100644 src/icons/Dots.svg rename src/icons/{Type=Error.svg => Error.svg} (100%) create mode 100644 src/icons/History.svg create mode 100644 src/icons/Home.svg create mode 100644 src/icons/Info.svg rename src/icons/{Type=InkLogo.svg => InkLogo.svg} (100%) rename src/icons/{Type=Loading.svg => Loading.svg} (100%) create mode 100644 src/icons/Logo/Ink.svg create mode 100644 src/icons/Logo/Placeholder.svg create mode 100644 src/icons/Logo/index.ts create mode 100644 src/icons/Mail.svg create mode 100644 src/icons/Menu.svg create mode 100644 src/icons/Minus.svg create mode 100644 src/icons/Moon.svg rename src/icons/{Type=Minus.svg => Page/One.svg} (55%) create mode 100644 src/icons/Page/Three.svg create mode 100644 src/icons/Page/Two.svg create mode 100644 src/icons/Page/index.ts create mode 100644 src/icons/Panel.svg create mode 100644 src/icons/Plus.svg create mode 100644 src/icons/Profile.svg create mode 100644 src/icons/Search.svg create mode 100644 src/icons/Settings.svg rename src/icons/{Type=SocialDiscord.svg => Social/Discord.svg} (100%) create mode 100644 src/icons/Social/Farcaster.svg rename src/icons/{Type=SocialGithub.svg => Social/Github.svg} (100%) create mode 100644 src/icons/Social/Mirror.svg create mode 100644 src/icons/Social/Telegram.svg create mode 100644 src/icons/Social/X.svg create mode 100644 src/icons/Social/index.ts rename src/icons/{Type=Sun.svg => Sun.svg} (100%) create mode 100644 src/icons/Swap.svg delete mode 100644 src/icons/Type=Arrow.svg delete mode 100644 src/icons/Type=Check.svg delete mode 100644 src/icons/Type=Chevron.svg delete mode 100644 src/icons/Type=Close.svg delete mode 100644 src/icons/Type=Copy.svg delete mode 100644 src/icons/Type=DefaultAppIcon.svg delete mode 100644 src/icons/Type=Deposit.svg delete mode 100644 src/icons/Type=History.svg delete mode 100644 src/icons/Type=Home.svg delete mode 100644 src/icons/Type=Menu.svg delete mode 100644 src/icons/Type=Moon.svg delete mode 100644 src/icons/Type=Profile.svg delete mode 100644 src/icons/Type=Search.svg delete mode 100644 src/icons/Type=Settings.svg delete mode 100644 src/icons/Type=SocialX.svg delete mode 100644 src/icons/Type=Success.svg delete mode 100644 src/icons/Type=Swap.svg create mode 100644 src/icons/Users.svg rename src/icons/{Type=Wallet.svg => Wallet.svg} (99%) diff --git a/scripts/import-svgs.mjs b/scripts/import-svgs.mjs index 780a55a..bd46b1f 100644 --- a/scripts/import-svgs.mjs +++ b/scripts/import-svgs.mjs @@ -7,42 +7,85 @@ import fs from "fs/promises"; import path from "path"; -const currentDir = import.meta.dirname; -const iconsDir = path.join(currentDir, "../src/icons"); - -const svgs = await fs.readdir(iconsDir); -await Promise.all( - svgs - .filter((svg) => svg.endsWith(".svg")) - .map(async (svg) => { - const svgContent = await fs.readFile(path.join(iconsDir, svg), "utf8"); - const result = svgContent - .replace(/stroke="#160F1F"/g, 'stroke="currentColor"') - .replace(/fill="#160F1F"/g, 'fill="currentColor"') - .replace(/width="24"/g, 'width="100%"') - .replace(/height="24"/g, 'height="100%"'); - await fs.writeFile(path.join(iconsDir, svg), result, "utf8"); - }) -); - /** Use this to map an invalid name temporarily (until it is fixed in the Figma) */ const iconNameMapping = {}; function getIconName(svg) { - const result = svg.replace(".svg", "").replace("Type=", ""); + const result = svg.replace(".svg", ""); return iconNameMapping[result] ?? result; } -const header = `/**\n * This file is auto-generated by the \`import-svgs.mjs\` script.\n */`; -const content = svgs - .filter((svg) => svg.endsWith(".svg")) - .map( - (svg) => `export { default as ${getIconName(svg)} } from "./${svg}?react";` - ) - .join("\n"); - -await fs.writeFile( - path.join(iconsDir, "index.ts"), - `${header}\n\n${content}\n`, - "utf8" -); +async function processSvgsInFolder(folder) { + // Start by renaming the files to remove the "Type=" or "Propery 1=" prefix + await Promise.all( + (await fs.readdir(folder, { recursive: true })).map(async (name) => { + if (name.includes("=")) { + const currentPath = name.split("/").slice(0, -1).join("/"); + const newName = currentPath + "/" + name.split("=")[1]; + if (await fs.access(path.join(folder, newName)).catch(() => false)) { + await fs.unlink(path.join(folder, newName)); + } + await fs.rename(path.join(folder, name), path.join(folder, newName)); + } + }) + ); + + const svgs = await fs.readdir(folder, { recursive: true }); + await Promise.all( + svgs + .filter((svg) => svg.endsWith(".svg")) + .map(async (svg) => { + console.log(path.join(folder, svg)); + const svgContent = await fs.readFile(path.join(folder, svg), "utf8"); + const result = svgContent + .replace(/stroke="#160F1F"/g, 'stroke="currentColor"') + .replace(/fill="#160F1F"/g, 'fill="currentColor"') + .replace(/width="24"/g, 'width="100%"') + .replace(/height="24"/g, 'height="100%"'); + await fs.writeFile(path.join(folder, svg), result, "utf8"); + }) + ); +} + +async function createIndexFile(folder) { + const header = `/**\n * This file is auto-generated by the \`import-svgs.mjs\` script.\n */`; + const stuffInDir = await fs.readdir(folder); + const foundSvgs = []; + const foundFolders = []; + await Promise.all( + stuffInDir.map(async (stuff) => { + if (stuff.endsWith(".svg")) { + foundSvgs.push(stuff); + } else if ((await fs.stat(path.join(folder, stuff))).isDirectory()) { + foundFolders.push(stuff); + } + }) + ); + await Promise.all( + foundFolders.map(async (f) => { + await createIndexFile(path.join(folder, f)); + }) + ); + const content = foundSvgs + .map( + (svg) => + `export { default as ${getIconName(svg)} } from "./${svg}?react";` + ) + .concat( + foundFolders.map( + (folder) => `export * as ${folder} from "./${folder}/index.ts";` + ) + ) + .join("\n"); + + await fs.writeFile( + path.join(folder, "index.ts"), + `${header}\n\n${content}\n`, + "utf8" + ); +} + +const currentDir = import.meta.dirname; +const dirToProcess = path.join(currentDir, "../src/icons"); +await processSvgsInFolder(dirToProcess); +await createIndexFile(dirToProcess); diff --git a/src/icons/AllIcons.css b/src/icons/AllIcons.css new file mode 100644 index 0000000..fddc743 --- /dev/null +++ b/src/icons/AllIcons.css @@ -0,0 +1,27 @@ +.tooltip-on-hover { + position: relative; +} + +.tooltip-on-hover:before { + display: block; + content: attr(data-title); + position: absolute; + top: 0; + transform: translateX(-50%) translateY(-125%); + background-color: var(--ink-button-primary); + color: var(--ink-text-on-primary); + padding: 4px 8px; + border-radius: 8px; + opacity: 0; + z-index: 1; + pointer-events: none; + width: 0; + left: 0; +} + +.tooltip-on-hover:hover:before { + left: 50%; + transition: opacity 0.1s ease-in-out; + opacity: 1; + width: auto; +} diff --git a/src/icons/AllIcons.tsx b/src/icons/AllIcons.tsx index a850536..3f11edd 100644 --- a/src/icons/AllIcons.tsx +++ b/src/icons/AllIcons.tsx @@ -1,7 +1,12 @@ import { classNames } from "../util/classes"; import * as Icons from "./index"; +import "./AllIcons.css"; -const icons = Object.values(Icons); +type IconType = (typeof Icons)[keyof typeof Icons]; + +interface IconsOrFolder { + [key: string]: IconType | IconsOrFolder; +} export const AllIcons: React.FC<{ containerClassName?: string; @@ -10,16 +15,71 @@ export const AllIcons: React.FC<{ return (
- {icons.map((Icon) => ( - - ))} +
Click to copy icon name
+
); }; + +function IconsOrFolder({ + title, + iconsOrFolder, + iconClassName, +}: { + title: string; + iconsOrFolder: IconsOrFolder; + iconClassName?: string; +}) { + return ( +
+
{title}
+ +
+ {Object.entries(iconsOrFolder).map(([name, IconOrFolder]) => { + if (!isIconFolder(IconOrFolder)) { + return ( +
`} + onClick={() => + navigator.clipboard.writeText(`<${title}.${name} />`) + } + > + +
+ ); + } + })} +
+ + {Object.entries(iconsOrFolder).map(([name, IconOrFolder]) => { + if (isIconFolder(IconOrFolder)) { + return ( + + ); + } + })} +
+ ); +} + +function isIconFolder(icon: IconType | IconsOrFolder): icon is IconsOrFolder { + return typeof icon === "object"; +} diff --git a/src/icons/Apps.svg b/src/icons/Apps.svg new file mode 100644 index 0000000..f5392c9 --- /dev/null +++ b/src/icons/Apps.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Arrow.svg b/src/icons/Arrow.svg new file mode 100644 index 0000000..8b9d82a --- /dev/null +++ b/src/icons/Arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Bridge.svg b/src/icons/Bridge.svg new file mode 100644 index 0000000..6e8e7ec --- /dev/null +++ b/src/icons/Bridge.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/icons/Check.svg b/src/icons/Check.svg new file mode 100644 index 0000000..362eaf5 --- /dev/null +++ b/src/icons/Check.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/CheckBadge.svg b/src/icons/CheckBadge.svg new file mode 100644 index 0000000..4274308 --- /dev/null +++ b/src/icons/CheckBadge.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Type=CheckFill.svg b/src/icons/CheckFill.svg similarity index 100% rename from src/icons/Type=CheckFill.svg rename to src/icons/CheckFill.svg diff --git a/src/icons/Chevron.svg b/src/icons/Chevron.svg new file mode 100644 index 0000000..802f284 --- /dev/null +++ b/src/icons/Chevron.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Close.svg b/src/icons/Close.svg new file mode 100644 index 0000000..42432b1 --- /dev/null +++ b/src/icons/Close.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/CloseSmall.svg b/src/icons/CloseSmall.svg new file mode 100644 index 0000000..bae188e --- /dev/null +++ b/src/icons/CloseSmall.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Code.svg b/src/icons/Code.svg new file mode 100644 index 0000000..4ba2928 --- /dev/null +++ b/src/icons/Code.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/icons/Copy.svg b/src/icons/Copy.svg new file mode 100644 index 0000000..3c145b4 --- /dev/null +++ b/src/icons/Copy.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Deposit.svg b/src/icons/Deposit.svg new file mode 100644 index 0000000..bcd988c --- /dev/null +++ b/src/icons/Deposit.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/icons/Type=Disconnect.svg b/src/icons/Disconnect.svg similarity index 100% rename from src/icons/Type=Disconnect.svg rename to src/icons/Disconnect.svg diff --git a/src/icons/Dots.svg b/src/icons/Dots.svg new file mode 100644 index 0000000..b7f3d67 --- /dev/null +++ b/src/icons/Dots.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Type=Error.svg b/src/icons/Error.svg similarity index 100% rename from src/icons/Type=Error.svg rename to src/icons/Error.svg diff --git a/src/icons/History.svg b/src/icons/History.svg new file mode 100644 index 0000000..c2fb42b --- /dev/null +++ b/src/icons/History.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Home.svg b/src/icons/Home.svg new file mode 100644 index 0000000..345210d --- /dev/null +++ b/src/icons/Home.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Info.svg b/src/icons/Info.svg new file mode 100644 index 0000000..a4fb01e --- /dev/null +++ b/src/icons/Info.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/icons/Type=InkLogo.svg b/src/icons/InkLogo.svg similarity index 100% rename from src/icons/Type=InkLogo.svg rename to src/icons/InkLogo.svg diff --git a/src/icons/Type=Loading.svg b/src/icons/Loading.svg similarity index 100% rename from src/icons/Type=Loading.svg rename to src/icons/Loading.svg diff --git a/src/icons/Logo/Ink.svg b/src/icons/Logo/Ink.svg new file mode 100644 index 0000000..a764191 --- /dev/null +++ b/src/icons/Logo/Ink.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Logo/Placeholder.svg b/src/icons/Logo/Placeholder.svg new file mode 100644 index 0000000..006c2b1 --- /dev/null +++ b/src/icons/Logo/Placeholder.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/icons/Logo/index.ts b/src/icons/Logo/index.ts new file mode 100644 index 0000000..c741c26 --- /dev/null +++ b/src/icons/Logo/index.ts @@ -0,0 +1,6 @@ +/** + * This file is auto-generated by the `import-svgs.mjs` script. + */ + +export { default as Ink } from "./Ink.svg?react"; +export { default as Placeholder } from "./Placeholder.svg?react"; diff --git a/src/icons/Mail.svg b/src/icons/Mail.svg new file mode 100644 index 0000000..d5dc53b --- /dev/null +++ b/src/icons/Mail.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/icons/Menu.svg b/src/icons/Menu.svg new file mode 100644 index 0000000..13dd577 --- /dev/null +++ b/src/icons/Menu.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Minus.svg b/src/icons/Minus.svg new file mode 100644 index 0000000..2f8308c --- /dev/null +++ b/src/icons/Minus.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Moon.svg b/src/icons/Moon.svg new file mode 100644 index 0000000..a4fc4f6 --- /dev/null +++ b/src/icons/Moon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Type=Minus.svg b/src/icons/Page/One.svg similarity index 55% rename from src/icons/Type=Minus.svg rename to src/icons/Page/One.svg index af43dcb..169d328 100644 --- a/src/icons/Type=Minus.svg +++ b/src/icons/Page/One.svg @@ -1,3 +1,3 @@ - + diff --git a/src/icons/Page/Three.svg b/src/icons/Page/Three.svg new file mode 100644 index 0000000..ceef021 --- /dev/null +++ b/src/icons/Page/Three.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/icons/Page/Two.svg b/src/icons/Page/Two.svg new file mode 100644 index 0000000..ea5ee0f --- /dev/null +++ b/src/icons/Page/Two.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/icons/Page/index.ts b/src/icons/Page/index.ts new file mode 100644 index 0000000..d3864e1 --- /dev/null +++ b/src/icons/Page/index.ts @@ -0,0 +1,7 @@ +/** + * This file is auto-generated by the `import-svgs.mjs` script. + */ + +export { default as One } from "./One.svg?react"; +export { default as Three } from "./Three.svg?react"; +export { default as Two } from "./Two.svg?react"; diff --git a/src/icons/Panel.svg b/src/icons/Panel.svg new file mode 100644 index 0000000..6fd62d7 --- /dev/null +++ b/src/icons/Panel.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Plus.svg b/src/icons/Plus.svg new file mode 100644 index 0000000..8665f4f --- /dev/null +++ b/src/icons/Plus.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/icons/Profile.svg b/src/icons/Profile.svg new file mode 100644 index 0000000..79f76b7 --- /dev/null +++ b/src/icons/Profile.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Search.svg b/src/icons/Search.svg new file mode 100644 index 0000000..482e9b8 --- /dev/null +++ b/src/icons/Search.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Settings.svg b/src/icons/Settings.svg new file mode 100644 index 0000000..fe61206 --- /dev/null +++ b/src/icons/Settings.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Type=SocialDiscord.svg b/src/icons/Social/Discord.svg similarity index 100% rename from src/icons/Type=SocialDiscord.svg rename to src/icons/Social/Discord.svg diff --git a/src/icons/Social/Farcaster.svg b/src/icons/Social/Farcaster.svg new file mode 100644 index 0000000..743db21 --- /dev/null +++ b/src/icons/Social/Farcaster.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Type=SocialGithub.svg b/src/icons/Social/Github.svg similarity index 100% rename from src/icons/Type=SocialGithub.svg rename to src/icons/Social/Github.svg diff --git a/src/icons/Social/Mirror.svg b/src/icons/Social/Mirror.svg new file mode 100644 index 0000000..9a59d27 --- /dev/null +++ b/src/icons/Social/Mirror.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/icons/Social/Telegram.svg b/src/icons/Social/Telegram.svg new file mode 100644 index 0000000..6290f8a --- /dev/null +++ b/src/icons/Social/Telegram.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/icons/Social/X.svg b/src/icons/Social/X.svg new file mode 100644 index 0000000..c821d6c --- /dev/null +++ b/src/icons/Social/X.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Social/index.ts b/src/icons/Social/index.ts new file mode 100644 index 0000000..f0b7993 --- /dev/null +++ b/src/icons/Social/index.ts @@ -0,0 +1,10 @@ +/** + * This file is auto-generated by the `import-svgs.mjs` script. + */ + +export { default as Discord } from "./Discord.svg?react"; +export { default as Farcaster } from "./Farcaster.svg?react"; +export { default as Github } from "./Github.svg?react"; +export { default as Mirror } from "./Mirror.svg?react"; +export { default as Telegram } from "./Telegram.svg?react"; +export { default as X } from "./X.svg?react"; diff --git a/src/icons/Type=Sun.svg b/src/icons/Sun.svg similarity index 100% rename from src/icons/Type=Sun.svg rename to src/icons/Sun.svg diff --git a/src/icons/Swap.svg b/src/icons/Swap.svg new file mode 100644 index 0000000..67e5f8a --- /dev/null +++ b/src/icons/Swap.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/icons/Type=Arrow.svg b/src/icons/Type=Arrow.svg deleted file mode 100644 index 49db8b3..0000000 --- a/src/icons/Type=Arrow.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Type=Check.svg b/src/icons/Type=Check.svg deleted file mode 100644 index b102fe1..0000000 --- a/src/icons/Type=Check.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Type=Chevron.svg b/src/icons/Type=Chevron.svg deleted file mode 100644 index 5a29dc2..0000000 --- a/src/icons/Type=Chevron.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Type=Close.svg b/src/icons/Type=Close.svg deleted file mode 100644 index 698e364..0000000 --- a/src/icons/Type=Close.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/Type=Copy.svg b/src/icons/Type=Copy.svg deleted file mode 100644 index bfdcbd0..0000000 --- a/src/icons/Type=Copy.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Type=DefaultAppIcon.svg b/src/icons/Type=DefaultAppIcon.svg deleted file mode 100644 index 514bd40..0000000 --- a/src/icons/Type=DefaultAppIcon.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/icons/Type=Deposit.svg b/src/icons/Type=Deposit.svg deleted file mode 100644 index 2b7e344..0000000 --- a/src/icons/Type=Deposit.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Type=History.svg b/src/icons/Type=History.svg deleted file mode 100644 index f0b8bb1..0000000 --- a/src/icons/Type=History.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/Type=Home.svg b/src/icons/Type=Home.svg deleted file mode 100644 index 3ea21ae..0000000 --- a/src/icons/Type=Home.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Type=Menu.svg b/src/icons/Type=Menu.svg deleted file mode 100644 index 64a689b..0000000 --- a/src/icons/Type=Menu.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/Type=Moon.svg b/src/icons/Type=Moon.svg deleted file mode 100644 index 55ad808..0000000 --- a/src/icons/Type=Moon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Type=Profile.svg b/src/icons/Type=Profile.svg deleted file mode 100644 index fafb4b2..0000000 --- a/src/icons/Type=Profile.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Type=Search.svg b/src/icons/Type=Search.svg deleted file mode 100644 index 94ddc20..0000000 --- a/src/icons/Type=Search.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Type=Settings.svg b/src/icons/Type=Settings.svg deleted file mode 100644 index f150307..0000000 --- a/src/icons/Type=Settings.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Type=SocialX.svg b/src/icons/Type=SocialX.svg deleted file mode 100644 index 5747558..0000000 --- a/src/icons/Type=SocialX.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Type=Success.svg b/src/icons/Type=Success.svg deleted file mode 100644 index f973b11..0000000 --- a/src/icons/Type=Success.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Type=Swap.svg b/src/icons/Type=Swap.svg deleted file mode 100644 index bf9c2ee..0000000 --- a/src/icons/Type=Swap.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/Users.svg b/src/icons/Users.svg new file mode 100644 index 0000000..d319747 --- /dev/null +++ b/src/icons/Users.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icons/Type=Wallet.svg b/src/icons/Wallet.svg similarity index 99% rename from src/icons/Type=Wallet.svg rename to src/icons/Wallet.svg index 6e55dc5..db70cf2 100644 --- a/src/icons/Type=Wallet.svg +++ b/src/icons/Wallet.svg @@ -1,4 +1,4 @@ - \ No newline at end of file + diff --git a/src/icons/index.ts b/src/icons/index.ts index 70d3d5a..4d8c3bd 100644 --- a/src/icons/index.ts +++ b/src/icons/index.ts @@ -2,30 +2,39 @@ * This file is auto-generated by the `import-svgs.mjs` script. */ -export { default as Arrow } from "./Type=Arrow.svg?react"; -export { default as Check } from "./Type=Check.svg?react"; -export { default as CheckFill } from "./Type=CheckFill.svg?react"; -export { default as Chevron } from "./Type=Chevron.svg?react"; -export { default as Close } from "./Type=Close.svg?react"; -export { default as Copy } from "./Type=Copy.svg?react"; -export { default as DefaultAppIcon } from "./Type=DefaultAppIcon.svg?react"; -export { default as Deposit } from "./Type=Deposit.svg?react"; -export { default as Disconnect } from "./Type=Disconnect.svg?react"; -export { default as Error } from "./Type=Error.svg?react"; -export { default as History } from "./Type=History.svg?react"; -export { default as Home } from "./Type=Home.svg?react"; -export { default as InkLogo } from "./Type=InkLogo.svg?react"; -export { default as Loading } from "./Type=Loading.svg?react"; -export { default as Menu } from "./Type=Menu.svg?react"; -export { default as Minus } from "./Type=Minus.svg?react"; -export { default as Moon } from "./Type=Moon.svg?react"; -export { default as Profile } from "./Type=Profile.svg?react"; -export { default as Search } from "./Type=Search.svg?react"; -export { default as Settings } from "./Type=Settings.svg?react"; -export { default as SocialDiscord } from "./Type=SocialDiscord.svg?react"; -export { default as SocialGithub } from "./Type=SocialGithub.svg?react"; -export { default as SocialX } from "./Type=SocialX.svg?react"; -export { default as Success } from "./Type=Success.svg?react"; -export { default as Sun } from "./Type=Sun.svg?react"; -export { default as Swap } from "./Type=Swap.svg?react"; -export { default as Wallet } from "./Type=Wallet.svg?react"; +export { default as Apps } from "./Apps.svg?react"; +export { default as Arrow } from "./Arrow.svg?react"; +export { default as Bridge } from "./Bridge.svg?react"; +export { default as Check } from "./Check.svg?react"; +export { default as CheckBadge } from "./CheckBadge.svg?react"; +export { default as CheckFill } from "./CheckFill.svg?react"; +export { default as Chevron } from "./Chevron.svg?react"; +export { default as Close } from "./Close.svg?react"; +export { default as CloseSmall } from "./CloseSmall.svg?react"; +export { default as Code } from "./Code.svg?react"; +export { default as Copy } from "./Copy.svg?react"; +export { default as Deposit } from "./Deposit.svg?react"; +export { default as Disconnect } from "./Disconnect.svg?react"; +export { default as Dots } from "./Dots.svg?react"; +export { default as Error } from "./Error.svg?react"; +export { default as History } from "./History.svg?react"; +export { default as Home } from "./Home.svg?react"; +export { default as Info } from "./Info.svg?react"; +export { default as InkLogo } from "./InkLogo.svg?react"; +export { default as Loading } from "./Loading.svg?react"; +export { default as Mail } from "./Mail.svg?react"; +export { default as Menu } from "./Menu.svg?react"; +export { default as Minus } from "./Minus.svg?react"; +export { default as Moon } from "./Moon.svg?react"; +export { default as Panel } from "./Panel.svg?react"; +export { default as Plus } from "./Plus.svg?react"; +export { default as Profile } from "./Profile.svg?react"; +export { default as Search } from "./Search.svg?react"; +export { default as Settings } from "./Settings.svg?react"; +export { default as Sun } from "./Sun.svg?react"; +export { default as Swap } from "./Swap.svg?react"; +export { default as Users } from "./Users.svg?react"; +export { default as Wallet } from "./Wallet.svg?react"; +export * as Logo from "./Logo/index.ts"; +export * as Page from "./Page/index.ts"; +export * as Social from "./Social/index.ts"; diff --git a/src/layout/InkLayout/InkLayout.tsx b/src/layout/InkLayout/InkLayout.tsx index 31a03a2..2e94e77 100644 --- a/src/layout/InkLayout/InkLayout.tsx +++ b/src/layout/InkLayout/InkLayout.tsx @@ -1,5 +1,4 @@ import { PropsWithChildren, useState } from "react"; -import { DefaultAppIcon } from "../../icons"; import { classNames } from "../../util/classes"; import { Button, InkIcon } from "../.."; @@ -20,7 +19,7 @@ export interface InkLayoutProps extends PropsWithChildren { export const InkLayout: React.FC = ({ className, - mainIcon = , + mainIcon = , headerContent, sideNavigation, topNavigation,