refactor(OrderCard): use design system components and CSS variables#65
Merged
Conversation
Component Integration: - Replace custom avatar div with Avatar component (name prop for initials) - Badge component already in use for status display - Card component already wrapping the content Theme Support (CSS Variables): - ring-primary for selected state (was ring-blue-500/400) - text-foreground for primary text (was text-gray-900/white) - text-muted-foreground for secondary text (was text-gray-500/400) - bg-muted for service tags (was bg-gray-100/800) - border-border for dividers (was border-gray-100/800) - bg-destructive/10 + text-destructive for rejection (was bg-red-50/900) - text-primary for links (was text-blue-600/400) - bg-primary for accept button (was bg-blue-600) Also adds --color-primary to @theme block in base.css to fix Tailwind v4 utility generation for text-primary, bg-primary, etc.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the OrderCard component to use design system components and CSS variables for improved theming support. The changes replace hard-coded Tailwind color utilities with semantic CSS variables and integrate the Avatar component from the design system.
Changes:
- Added
--color-primaryvariable to base.css to enable Tailwind v4 utilities liketext-primary,bg-primary, andring-primary - Replaced custom avatar div with the Avatar component using the
nameprop for automatic initial generation - Converted all hard-coded color classes to semantic CSS variables (e.g.,
text-gray-900/white→text-foreground,bg-blue-600→bg-primary)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/styles/base.css | Adds --color-primary variable to enable base text-primary, bg-primary, and ring-primary Tailwind utilities |
| src/components/OrderCard/OrderCard.tsx | Replaces custom avatar with Avatar component and converts all hard-coded color classes to semantic design system variables for theme support |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Component Integration:
Theme Support (CSS Variables):
Also adds --color-primary to @theme block in base.css to fix Tailwind v4 utility generation for text-primary, bg-primary, etc.
order-card.mov