--- /** * PricingTable.astro * --------------------------------------------------------------------------- * Generic quantity/pricing table. Takes a caption + a list of tiers * ({ band, price, note? }) and renders a clean three-column table. Used for * both the card-set tiers and the deck-box print tiers. */ import Icon from '@components/Icon.astro'; interface Tier { band: string; price: string; note?: string; } interface Props { /** mdi icon shown beside the caption. */ icon?: string; caption: string; tiers: Tier[]; /** Column header for the price column, e.g. "Price". */ priceHeader?: string; /** Optional supporting line under the caption. */ subtitle?: string; } const { icon, caption, tiers, priceHeader = 'Price', subtitle } = Astro.props; ---
{icon && } {caption} {subtitle && ( {subtitle} )}
{tiers.map((tier, i) => ( 0 ? 'border-top: 1px solid var(--color-border);' : undefined}> ))}
Quantity {priceHeader}
{tier.band} {tier.note && ( ({tier.note}) )} {tier.price}