--- // Port of preview/pages/badges.html (layout: default) import DefaultLayout from '@shared/layouts/DefaultLayout.astro'; import Icon from '@shared/components/Icon.astro'; import DropdownMenu from '@shared/components/ui/DropdownMenu.astro'; import site from '@data/site.json'; // Liquid: colors = ['default'] + site.colors keys + ['dark', 'light'] const colors = ['default', ...Object.keys(site.colors), 'dark', 'light']; const sizes = ['sm', 'md', 'lg']; // Liquid uc_first filter const ucFirst = (value: string) => value.charAt(0).toUpperCase() + value.slice(1); --- Example heading New Example heading New Example heading New Example heading New Example heading New Example heading New Badge sizes { sizes.map((size) => ( Default Left icon Right icon )) } Positioned badges Notifications 4 Inbox 9+ unread messages Profile Settings Basic badges {colors.map((color) => {ucFirst(color)})} Light badges {colors.map((color) => {ucFirst(color)})} Outline badges {colors.map((color) => {ucFirst(color)})} Badges with icons { colors.map((color) => ( {' '} {ucFirst(color)}{' '} )) } { colors.map((color, index) => ( {ucFirst(color)} badge {index + 1} )) } { colors.map((color, index) => ( {ucFirst(color)} badge{' '} {index + 1} )) } { colors.map((color) => ( {ucFirst(color)} badge )) }