diff --git a/docs/src/components/app.tsx b/docs/src/components/app.tsx index ade99821..e63a1760 100644 --- a/docs/src/components/app.tsx +++ b/docs/src/components/app.tsx @@ -1,21 +1,9 @@ import React from 'react'; -import iconsJson from '../../../dist/icons.json'; -import tagsJson from '../../../src/tags.json'; import clsx from 'clsx'; import { version } from '../../../package.json'; - -type StrokeLincap = 'round' | 'square' | 'butt'; -type StrokeLinejoin = 'round' | 'bevel' | 'miter'; - -const icons = Object.entries(iconsJson) - .map(([name, svg]) => { - const tags: Array = tagsJson[name] || []; - return { name, svg, tags }; - }) - .reduce((acc, icon) => { - acc[icon.name] = icon; - return acc; - }, {} as Record }>); +import { useSearchParam } from '../lib/use-search-param'; +import { icons } from '../lib/icons'; +import { Icon } from '../components/icon'; export function App() { const [query, setQuery] = useSearchParam('query', ''); @@ -71,17 +59,7 @@ export function App() { }, []); return ( -
+
@@ -93,16 +71,10 @@ export function App() {
- +
-

- Beautifully simple open-source icons designed on a 24×24 grid. -

+

Beautifully simple open-source icons designed on a 24px grid.

Request an icon - + Donate on PayPal - + GitHub - +
@@ -172,6 +132,12 @@ export function App() {
    {selectedIcon}
    - + { setSelectedIcon(''); }} > - +
-
- +
+
@@ -224,10 +197,10 @@ export function App() { SVG
- + - +
@@ -247,7 +220,7 @@ export function App() { Tags
- +
@@ -310,7 +283,7 @@ export function App() {
-
+
-
+
& { - name: string; - size?: string; - color?: string; -}) { - if (!icons[name]) { - return null; - } - - return ( - - ); -} - function IconButton(props: React.ComponentPropsWithoutRef<'button'>) { return (