8000 feat: redesign Card component styles for improved aesthetics by iamraihan · Pull Request #135 · getdokan/dokan-ui · GitHub
[go: up one dir, main page]

Skip to content

feat: redesign Card component styles for improved aesthetics - #135

Merged
shams-sadek1981 merged 1 commit into
developfrom
feat/card-redesign
Mar 12, 2026
Merged

shams-sadek1981 merged 1 commit into
developfrom
feat/card-redesign

Conversation

@iamraihan
@iamraihan iamraihan commented Mar 12, 2026 •
Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Style
    • Enhanced Card component styling with rounded corners, refined shadows, improved color hierarchy, and tighter spacing for a more polished visual appearance.

@coderabbitai
coderabbitai Bot commented Mar 12, 2026 •
Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Visual styling updates to the Card component include rounded corners, white background, and subtle shadow on the root element. Header styling refined with adjusted padding, lighter background, and distinct border. Title and subtitle typography enhanced with bolder colors and tighter spacing using specific color tokens. Body padding reduced to 5px.

Changes

Cohort / File(s) Summary
Card Component Styling
src/components/Card.tsx
Root element gains rounded-xl, white background, and shadow effects. Header padding adjusted with lighter background and border styling. Title and subtitle typography refined with specific color tokens and compact spacing. Body padding changed to 5px. Styling migrates from generic borders to explicit color tokens and elevated surface design.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A Card now shines with rounded grace,
With shadows soft in every place,
Fresh colors dance and spacing glows,
bounces excitedly ✨
Where elegance and style now flows! 🎨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: visual styling updates to the Card component with improved aesthetics through rounded corners, colors, shadows, and typography adjustments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/card-redesign

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/Card.tsx`:
- Line 15: The Card component's container class list needs to clip child
backgrounds so the new tinted header respects the rounded corners; update the
class string used in the Card component (the 'w-full rounded-xl ...' class) to
include overflow-hidden (or equivalent) so child elements are clipped to the
rounded-xl shell and the header background doesn't bleed past the top corners.
- Line 63: The paragraph element in Card.tsx builds class names using
classNames(...) and currently uses the invalid Tailwind utility "leading5";
update that utility to the correct hyphenated form "leading-5" inside the
classNames call (i.e., change leading5 to leading-5) so the <p> element's
className is valid Tailwind.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: eaf91396-d27e-4d03-a18b-d8904be6ff43

📥 Commits

Reviewing files that changed from the base of the PR and between 9cfef57 and 9bd4d35.

📒 Files selected for processing (1)
  • src/components/Card.tsx

Comment thread src/components/Card.tsx
<div
className={classNames(
'w-full rounded transition-all duration-300 border',
'w-full rounded-xl transition-all duration-300 bg-white shadow-[0_1px_2px_-1px_rgba(0,0,0,0.10),0_1px_3px_0_rgba(0,0,0,0.10)]',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Clip child backgrounds to the new rounded container.

With the new tinted header, the card should also hide overflow; otherwise the header background/radius can visually mismatch the rounded-xl shell at the top corners.

Proposed fix
-        'w-full rounded-xl transition-all duration-300  bg-white shadow-[0_1px_2px_-1px_rgba(0,0,0,0.10),0_1px_3px_0_rgba(0,0,0,0.10)]',
+        'w-full overflow-hidden rounded-xl transition-all duration-300 bg-white shadow-[0_1px_2px_-1px_rgba(0,0,0,0.10),0_1px_3px_0_rgba(0,0,0,0.10)]',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'w-full rounded-xl transition-all duration-300 bg-white shadow-[0_1px_2px_-1px_rgba(0,0,0,0.10),0_1px_3px_0_rgba(0,0,0,0.10)]',
'w-full overflow-hidden rounded-xl transition-all duration-300 bg-white shadow-[0_1px_2px_-1px_rgba(0,0,0,0.10),0_1px_3px_0_rgba(0,0,0,0.10)]',
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/Card.tsx` at line 15, The Card component's container class
list needs to clip child backgrounds so the new tinted header respects the
rounded corners; update the class string used in the Card component (the 'w-full
rounded-xl ...' class) to include overflow-hidden (or equivalent) so child
elements are clipped to the rounded-xl shell and the header background doesn't
bleed past the top corners.

Comment thread src/components/Card.tsx
const Subtitle = ({ className, children, ...rest }: CardSubtitleProps) => {
return (
<p className={classNames('text-sm text-gray-500', className)} {...rest}>
<p className={classNames('text-sm text-[#464654] leading5', className)} {...rest}>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

In Tailwind CSS v4.1, is leading5a valid utility class, or should the line-height utility be written asleading-5?

💡 Result:

leading5 is not a valid Tailwind CSS v4.1 utility class name. The line-height utility uses a hyphenated form: leading-<number> (for example, leading-5). (tailwindcss.com)

Citations:


Fix the invalid Tailwind line-height utility class.

leading5 is not a valid Tailwind CSS utility class. The line-height utility must use a hyphenated format: leading-5.

Proposed fix
-    <p className={classNames('text-sm text-[`#464654`] leading5', className)} {...rest}>
+    <p className={classNames('text-sm text-[`#464654`] leading-5', className)} {...rest}>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/Card.tsx` at line 63, The paragraph element in Card.tsx builds
class names using classNames(...) and currently uses the invalid Tailwind
utility "leading5"; update that utility to the correct hyphenated form
"leading-5" inside the classNames call (i.e., change leading5 to leading-5) so
the <p> element's className is valid Tailwind.

@shams-sadek1981
shams-sadek1981 requested a review from Copilot March 12, 2026 05:36
@shams-sadek1981
shams-sadek1981 merged commit ccca775 into develop Mar 12, 2026
4 checks passed
Copilot AI left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Card component’s Tailwind classes to achieve a more polished visual style (rounded corners, updated shadows/colors, and adjusted spacing) within the React component library.

Changes:

  • Updated base Card container styling (rounded corners, background, shadow, hover shadow when clickable).
  • Refined Card.Header, Card.Title, Card.Subtitle, and Card.Body spacing/typography/colors.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/components/Card.tsx
const Subtitle = ({ className, children, ...rest }: CardSubtitleProps) => {
return (
<p className={classNames('text-sm text-gray-500', className)} {...rest}>
<p className={classNames('text-sm text-[#464654] leading5', className)} {...rest}>
Copilot AI Mar 12, 2026
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leading5 is not a valid Tailwind utility class, so the subtitle line-height styling will be silently ignored. Use a valid line-height utility (e.g., leading-5 or another appropriate leading-*) to ensure consistent typography.

Suggested change
<p className={classNames('text-sm text-[#464654] leading5', className)} {...rest}>
<p className={classNames('text-sm text-[#464654] leading-5', className)} {...rest}>

Copilot uses AI. Check for mistakes.
@iamraihan iamraihan self-assigned this Mar 12, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Mar 12, 2026

This branch was successfully deployed

1 active deployment
Preview — 9bd4d35f Deployed Mar 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0