--- // Stepper where it is used most: a quantity per line of a small cart. Three // lines, each with its own stepper; the cursor rests on the increase button of // the middle one, and the last line sits at its stock limit so its increase // button is disabled - the state the plugin sets, not a faked one. // // The capture never hovers, so the middle line is written by hand (the // custom-buttons markup) and its increase button gets the hover background // through the `--btn-bg` token, the same colour a real hover paints. import ScreenshotLayout from '../layouts/ScreenshotLayout.astro' import Card from '@ui/Card.astro' import Stepper from '@ui/Stepper.astro' const cart = [ { name: 'Hex nut M8 DIN 934', code: 'Zinc plated', price: '$12.40', quantity: 2, max: 50 }, { name: 'Lock nut M8 DIN 985', code: 'Stainless A2', price: '$28.90', quantity: 1, max: 20 }, { name: 'Cap nut M8 DIN 1587', code: 'Brass', price: '$41.00', quantity: 3, max: 3 }, ] --- { cart.map((item, index) => ( )) }
{item.name}
{item.code}
{item.price}
{index === 1 ? (
) : ( )}