Skip to content

feat: create reusable Card component with responsive styling - #42

Open
omsrajput977 wants to merge 1 commit into
Vikram-sardiwal:mainfrom
omsrajput977:feature/reusable-card-component
Open

omsrajput977 wants to merge 1 commit into
Vikram-sardiwal:mainfrom
omsrajput977:feature/reusable-card-component

Conversation

@omsrajput977

@omsrajput977 omsrajput977 commented Aug 28, 2026 •

Copy link
Copy Markdown

Description

Created a flexible and reusable Card component that supports custom titles, descriptions, images, action buttons/links, and custom child elements. Added responsive styling and complete dark mode support matching the existing project design.

Related Issue

Closes #32

Type of Change

Please select all applicable options:

  • Bug fix
  • New feature
  • Documentation update
  • UI/Styling improvement
  • Refactoring
  • Performance improvement
  • Other (please describe):

Changes Made

  • Created src/components/Card.jsx with props for title, description, image, imageAlt, and actions (actionText, actionLink, onAction, custom action element).
  • Added responsive card and grid styling in src/App.css including hover effects and dark mode (html[data-theme="dark"]) compatibility.
  • Integrated the Card component in src/components/Welcome.jsx to showcase components on the home page without breaking existing UI.
  • Added prop-types validation to maintain coding standards and ensure lint checks pass cleanly.

Testing

  • Ran npm run lint successfully
  • Tested the changes locally
  • Verified the affected functionality
  • Checked for console errors or warnings
  • Checked responsive design where applicable

Documentation

  • Updated the README or documentation if necessary
  • No documentation changes are required

Screenshots / Videos

Checklist

Before submitting this pull request, please confirm:

  • My code follows the project's coding standards.
  • I have tested my changes locally.
  • I have run npm run lint and resolved any issues.
  • I have not introduced unnecessary dependencies.
  • I have updated relevant documentation where necessary.
  • I have reviewed my own changes before requesting a review.
  • I have created a separate branch for this change.
  • I have linked the related issue.
  • Existing functionality still works.

Additional Notes

All props in the Card component are optional, ensuring it can adapt to various content structures across the app.

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.

Reusable Card Component

1 participant