Decathlon / vitamin-web

Decathlon Design System UI components for web applications
https://decathlon.github.io/vitamin-web
Apache License 2.0
279 stars 77 forks source link

feat: make extensible `Quantity` component #1364

Closed lauthieb closed 1 year ago

lauthieb commented 1 year ago

Changes description

Closes #1356

As we need to make it extensible without making breaking changes, I propose to add a new prop called fullWidth (boolean by default === 'false').

CleanShot 2023-02-08 at 21 40 39@2x CleanShot 2023-02-08 at 21 52 08@2x CleanShot 2023-02-08 at 22 10 00@2x CleanShot 2023-02-08 at 21 52 27@2x

For your information, in Figma, there's no prop (variant) because the behavior is like this: CleanShot 2023-02-08 at 22 14 34. That was I think the best thing to reproduce this behavior is to set a full width based on the quantity's parent.

Checklist

Does this introduce a breaking change?