diff --git a/.changeset/icons-page-all-icons.md b/.changeset/icons-page-all-icons.md new file mode 100644 index 000000000..be9ccb57c --- /dev/null +++ b/.changeset/icons-page-all-icons.md @@ -0,0 +1,5 @@ +--- +"@tabler/preview": patch +--- + +Fixed the preview icons page to render all icons in production builds, keeping the 20-icon limit only for the dev server. diff --git a/shared/components/cards/Icons.astro b/shared/components/cards/Icons.astro index 20b3ba245..90aa53309 100644 --- a/shared/components/cards/Icons.astro +++ b/shared/components/cards/Icons.astro @@ -10,8 +10,9 @@ interface Props { const { title, type = 'outline' } = Astro.props -// Dev preview limits icons to 20 (see BaseLayout). -const limit = 20 +// The dev server renders only the first 20 icons so the page stays fast; +// `astro build` (the zip package and production site) renders all of them. +const limit = import.meta.env.DEV ? 20 : Infinity const entries = Object.entries(icons as Record }>) .filter(([, icon]) => icon.svg?.[type])