diff options
| author | Josh Kingsley <josh@joshkingsley.me> | 2025-11-24 15:46:22 +0200 |
|---|---|---|
| committer | Josh Kingsley <josh@joshkingsley.me> | 2025-11-24 15:46:22 +0200 |
| commit | d724cc0bf6ff6d351319e6fb00f5184a04e16ac0 (patch) | |
| tree | cb43253479df5db8f4844e17e68a48ea5a212df4 /packages/web/src/components/icons/index.ts | |
| parent | 7c966e105cd9f65853de1aba0ecce63aa56aca0b (diff) | |
chore: improve dev tasks
Diffstat (limited to 'packages/web/src/components/icons/index.ts')
| -rw-r--r-- | packages/web/src/components/icons/index.ts | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/packages/web/src/components/icons/index.ts b/packages/web/src/components/icons/index.ts deleted file mode 100644 index 5731026..0000000 --- a/packages/web/src/components/icons/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -import plus16 from "./svgs/plus16.svg?raw"; -import minus16 from "./svgs/minus16.svg?raw"; - -function makeIconFactory(source: string) { - return (attrs?: object): SVGElement => { - const parser = new DOMParser(); - const doc = parser.parseFromString(source, "image/svg+xml"); - const svg = doc.documentElement as unknown as SVGElement; - - if (attrs) { - Object.entries(attrs).forEach(([k, v]) => svg.setAttribute(k, v)); - } - - return svg; - }; -} - -export const plus16Icon = makeIconFactory(plus16); -export const minus16Icon = makeIconFactory(minus16); |
