Skip to content

feat(react): add dark mode support to UI components (Fixes #18)#19

Merged
haroonwaves merged 7 commits into
haroonwaves:mainfrom
adityashirsatrao007:feat/react-dark-mode
Dec 10, 2025
Merged

feat(react): add dark mode support to UI components (Fixes #18)#19
haroonwaves merged 7 commits into
haroonwaves:mainfrom
adityashirsatrao007:feat/react-dark-mode

Conversation

@adityashirsatrao007

Copy link
Copy Markdown
Contributor

Added dark mode support to all React components in @haroonwaves/blog-kit-react.

Changes

  • BlogCard.tsx: Added \dark:\ utility classes for background, text, borders, and links.
  • Badge.tsx: Updated colors to be visible on dark backgrounds usage \dark:bg-orange-900/30\ and \dark:text-orange-300.
  • BlogPlaceholder.tsx: Inverted background and border colors for dark mode.
  • BlogRenderer.tsx: Comprehensive update to \defaultComponents\ mapped to ReactMarkdown, ensuring all rendered markdown content (headers, paragraphs, codes, quotes, tables) has appropriate dark mode styles. Added \dark:prose-invert.
  • BlogList.tsx: Updated empty state text color.

verification

  • Manually verified class syntax.
  • Ran \pnpm build\ in \packages/blog-kit-react\ to ensure TypeScript compliance (Successful).

Fixes #18

- Update BlogCard, Badge, BlogPlaceholder with dark variant classes
- Configure BlogRenderer to use dark mode text and background colors
- Ensure all color utilities support standard dark mode inversion
Copilot AI review requested due to automatic review settings December 10, 2025 13:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds comprehensive dark mode support to the @haroonwaves/blog-kit-react component library by implementing Tailwind CSS dark mode variants across all UI components. The changes ensure proper visual styling for backgrounds, text colors, borders, and interactive elements when users enable dark mode.

Key Changes:

  • Extended all React components with dark: utility classes for backgrounds, text, borders, and hover states
  • Added dark:prose-invert to BlogRenderer for automatic typography color inversion in markdown content
  • Updated Badge component with dark mode-friendly colors using opacity modifiers

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
BlogRenderer.tsx Added dark mode classes to all markdown elements (headings, paragraphs, lists, code, blockquotes, tables, links) and added dark:prose-invert to the prose container
BlogCard.tsx Applied dark mode styling to card borders, text colors for title/description/metadata, and link colors
BlogPlaceholder.tsx Updated skeleton loader backgrounds and borders for dark mode visibility
BlogList.tsx Added dark mode text color to empty state message
Badge.tsx Updated badge colors with dark-friendly orange variants using transparency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/blog-kit-react/src/components/BlogCard.tsx Outdated
Comment thread packages/blog-kit-react/src/components/BlogCard.tsx Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 10, 2025 13:13
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/blog-kit-react/src/components/BlogCard.tsx Outdated
Comment thread packages/blog-kit-react/src/components/BlogRenderer.tsx Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 10, 2025 13:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/blog-kit-react/src/components/BlogRenderer.tsx Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 10, 2025 13:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/blog-kit-react/src/components/BlogRenderer.tsx Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 10, 2025 13:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@haroonwaves

Copy link
Copy Markdown
Owner

Thanks for the PR! CI is failing at the moment please take a look when you can. Also, you’re the first external contributor to this project, so really appreciate you jumping in. I’ll do a full review once the checks pass.

@adityashirsatrao007

Copy link
Copy Markdown
Contributor Author

Fixed the CI failure - the issue was Prettier formatting. I ran 'pnpm format' to apply the correct code style to all 26 files that were flagged. The workflow run needs maintainer approval since I'm a first-time contributor. Once approved, CI should pass now - I've verified locally that 'pnpm check' succeeds (lint + format:check + type-check all pass).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@haroonwaves haroonwaves left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM

@haroonwaves haroonwaves merged commit 51a3c7e into haroonwaves:main Dec 10, 2025
7 checks passed
@adityashirsatrao007

Copy link
Copy Markdown
Contributor Author

LGTM

If there are any more issues,you'd like me to work on,just assign me,I'd love to be of help.

@haroonwaves

Copy link
Copy Markdown
Owner

If there are any more issues,you'd like me to work on,just assign me,I'd love to be of help.

Really appreciate you saying that. I’ll assign you more tasks as they come up, thanks again for your support.

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.

Dark mode

3 participants