Skip to content

Changelog - @caspeco/casper-ui-library

Version 11.0.0

Breaking changes

QuantityButton

The quantity is now a real input, you can type a number instead of only able to click +/- button. To make that work the API had to change, so v11 is a breaking release for this component.

Migration: quantity becomes value, and the two click handlers become one onValueChange that fires for both typing and the buttons (stepping is handled internally now):

{/* before */}
<QuantityButton
quantity={guests}
onClickPlus={() => setGuests((n) => n + 1)}
onClickMinus={() => setGuests((n) => n - 1)}
min={1}
max={20}
/>
{/* after */}
<QuantityButton
value={guests}
onValueChange={setGuests}
min={1}
max={20}
aria-label="Guests"
/>

What’s Changed

Library changes

Full Changelog: https://github.com/Caspeco/casper-ui-library/compare/10.9.1...11.0.0