13bd245872bbb5e6e716d5160d4801c95f7987b4
When a package is already in the comparison basket, the Compare button swaps to a "In comparison" selected-state: soft brand-50 fill + brand-300 border + brand-700 text + leading check icon. Technically disabled (aria-disabled + no onClick) but sx-overrides the default greyed Mui-disabled look so it reads as "selected/added," not "unavailable." Pattern: e-commerce "Added to cart" state. Removal happens via the floating CompareBar (already owns basket mutation), not this button — keeps the responsibility split clean. API: - PackageDetail: new `inCart?: boolean` prop. - PackagesStep: forwarded as `isSelectedPackageInCart?: boolean`. - Demo route (Packages.tsx): computes `basket.has(key)` for the current selection and passes it through. Storybook: new PackageDetail story `InCart` alongside the existing `Default` and `CompareLoading` states. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
No description provided
Languages
TypeScript
94.6%
JavaScript
2.8%
CSS
2.5%
HTML
0.1%