diff --git a/docs/src/app/Icons.tsx b/docs/src/app/Icons.tsx index 8d383138..7923a623 100644 --- a/docs/src/app/Icons.tsx +++ b/docs/src/app/Icons.tsx @@ -55,7 +55,7 @@ export default function Icons() { gap: { xs: 1 } }} > - + Categories @@ -66,35 +66,42 @@ export default function Icons() { '--ListItem-paddingY': 0, '--ListItem-radius': '4px', '--ListItem-minHeight': '2.25rem', - '--ListItem-paddingLeft': '.5rem', - '--ListItem-paddingRight': '.5rem', '--ListItemDecorator-size': '1.5rem' }} > - {categories.map((_category) => ( - - { - if (category?.slug === _category.slug) { - setCategory(null); - } else { - setCategory(_category); - } + {categories.map((_category) => { + const categoryIcons = searchableList.filter((icon) => icon.categories.includes(_category.slug)); - setPage(0); - }} - selected={category?.slug === _category.slug} - color="primary" - > - - - - - {_category.title} - - - - ))} + if (categoryIcons.length === 0) { + return; + } + + return ( + + { + if (category?.slug === _category.slug) { + setCategory(null); + } else { + setCategory(_category); + } + + setPage(0); + }} + selected={category?.slug === _category.slug} + color="primary" + > + + + + + {_category.title} + + {categoryIcons.length} + + + ); + })}
diff --git a/docs/src/data/categories.ts b/docs/src/data/categories.ts index 6d4f5ddb..42dd1903 100644 --- a/docs/src/data/categories.ts +++ b/docs/src/data/categories.ts @@ -108,11 +108,6 @@ const categories = [ title: "Files & folders", icon: viFiles }, - { - slug: "film", - title: "Film", - icon: viVideo - }, { slug: "gaming", title: "Gaming", @@ -128,11 +123,6 @@ const categories = [ title: "Human", icon: viEye }, - { - slug: "letters-numbers", - title: "Letters & numbers", - icon: viRectangleP - }, { slug: "logistics", title: "Logistics", @@ -168,11 +158,6 @@ const categories = [ title: "People", icon: viPerson }, - { - slug: "play", - title: "Play & sport", - icon: viPlay - }, { slug: "punctuation-symbols", title: "Punctuation & symbols",