feat: add sale and new badges to product card#124
Open
stacelKonrad wants to merge 1 commit intomainfrom
Open
Conversation
Collaborator
stacelKonrad
commented
Apr 24, 2026
- add sale and new badge to product card component
- add yellow color for badges
5 tasks
mstarzak
reviewed
May 6, 2026
| )} | ||
| > | ||
| {data?.badges && data.badges.length > 0 && ( | ||
| <div className='pointer-events-auto absolute top-2 left-2 z-10 flex flex-col items-start gap-1'> |
Collaborator
There was a problem hiding this comment.
Let badge clicks reach the card link. When a product has badges, this new absolutely positioned wrapper sits above the full-card Link (z-10 vs z-1) and uses pointer-events-auto. Since the badge overlay has no click handler, clicking the badge area in the top-left of the image does nothing instead of opening the product. Make this noninteractive overlay ignore pointer events so the card link still receives the click.
| red: 'bg-red-400 text-white', | ||
| gray: 'bg-gray-200 text-gray-700 focus-visible:ring-gray-200/80', | ||
| yellow: 'bg-orange-500 text-gray-950 focus-visible:ring-yellow-500/80', | ||
| yellow: 'bg-yellow-500 text-white focus-visible:ring-yellow-500/80', |
Collaborator
There was a problem hiding this comment.
Not sure if contrast is not to low between text and bg. Maybe text-gray-900 would be better?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.