Skip to content

Add CardMultipleIcons component for displaying multiple icons#66

Merged
BIA3IA merged 5 commits intomainfrom
bianca/card-multiple-icons
Apr 9, 2026
Merged

Add CardMultipleIcons component for displaying multiple icons#66
BIA3IA merged 5 commits intomainfrom
bianca/card-multiple-icons

Conversation

@BIA3IA
Copy link
Copy Markdown
Contributor

@BIA3IA BIA3IA commented Apr 9, 2026

Introduce a new CardMultipleIcons component that allows for the display of multiple icons in a flexible layout.

Closes #65

@BIA3IA BIA3IA self-assigned this Apr 9, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a new CardMultipleIcons React component and its props type, and integrates it into the home page by rendering a centered wrapper containing multiple social icon elements beneath the existing Hero and Materials sections.

Changes

Cohort / File(s) Summary
CardMultipleIcons component
src/components/card-multiple-icons/index.tsx, src/components/card-multiple-icons/types.ts
Adds CardMultipleIcons and CardMultipleIconsProps. Normalizes icons with React.Children.toArray, composes classes via cn, wraps content in Glass, and maps icons into span wrappers (uses child key when present).
Page integration
src/app/page.tsx
Inserts a centered, padded container (mx-auto w-fit py-12) after Hero/Materials and renders CardMultipleIcons with an array of JSX icon elements (mix of next/image SVG renders and react-icons/fi components), each given explicit key values.

Sequence Diagram(s)

sequenceDiagram
  participant Page as Page (src/app/page.tsx)
  participant Card as CardMultipleIcons (component)
  participant Glass as Glass (layout wrapper)
  participant Icon as Icon elements (next/image / react-icons)

  rect rgba(0,128,255,0.5)
    Page->>Card: render <CardMultipleIcons icons=[...]/>
  end

  rect rgba(0,200,100,0.5)
    Card->>Glass: wrap content
    Card->>Icon: map icons -> <span>{icon}</span> (use icon.key if present)
  end

  rect rgba(200,100,0,0.5)
    Icon-->>Glass: rendered icon nodes
    Glass-->>Page: composed component tree returned
  end
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a CardMultipleIcons component for displaying multiple icons, which matches the changeset.
Linked Issues check ✅ Passed The PR successfully implements the CardMultipleIcons component (#65) with proper props, styling, and integration, meeting the requirement to create a UI element for rendering multiple icons together.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the CardMultipleIcons component: types definition, component implementation, and integration into the main page—no out-of-scope changes detected.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/components/card-multiple-icons/types.ts (1)

3-4: Constrain icons to React elements for a tighter component contract.

icons currently accepts any ReactNode (Line 4), including primitives/null. This weakens the contract for an icon-only component. All current usages pass JSX elements only, so tightening to ReactElement[] is safe.

♻️ Proposed type tightening
-import type * as React from "react"
+import type { ReactElement } from "react"

 export type CardMultipleIconsProps = {
-  icons: React.ReactNode[]
+  icons: readonly ReactElement[]
   className?: string
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/card-multiple-icons/types.ts` around lines 3 - 4, The
CardMultipleIconsProps type currently allows icons: React.ReactNode[] which
permits primitives/null; tighten the contract by changing the icons property to
an array of React elements (e.g., React.ReactElement[] or JSX.Element[]) so only
JSX elements are allowed; update the import/usage in the file to reference
React.ReactElement (or JSX.Element) and ensure any call sites still pass
elements (no runtime changes required).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/components/card-multiple-icons/types.ts`:
- Around line 3-4: The CardMultipleIconsProps type currently allows icons:
React.ReactNode[] which permits primitives/null; tighten the contract by
changing the icons property to an array of React elements (e.g.,
React.ReactElement[] or JSX.Element[]) so only JSX elements are allowed; update
the import/usage in the file to reference React.ReactElement (or JSX.Element)
and ensure any call sites still pass elements (no runtime changes required).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 264434a6-56fd-4428-9b4a-214eafbd9e9f

📥 Commits

Reviewing files that changed from the base of the PR and between ade80e3 and 254b5ec.

📒 Files selected for processing (3)
  • src/app/page.tsx
  • src/components/card-multiple-icons/index.tsx
  • src/components/card-multiple-icons/types.ts

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/app/page.tsx (1)

17-22: Normalize icon size across Image and react-icons entries.

react-icons entries follow the parent text size, but the Image entries can follow intrinsic SVG dimensions. Explicit sizing here will keep visual rhythm stable across assets (Line 17 and Line 21 vs Line 18–Line 20 and Line 22).

Proposed patch
         <CardMultipleIcons
           icons={[
-            <Image key="telegram" src={telegram} alt="Telegram" />,
-            <FiInstagram key="instagram" />,
-            <FiLinkedin key="linkedin" />,
-            <FiFacebook key="facebook" />,
-            <Image key="discord" src={discord} alt="Discord" />,
-            <FiGithub key="github" />,
+            <Image key="telegram" src={telegram} alt="Telegram" className="h-6 w-6" />,
+            <FiInstagram key="instagram" size={24} />,
+            <FiLinkedin key="linkedin" size={24} />,
+            <FiFacebook key="facebook" size={24} />,
+            <Image key="discord" src={discord} alt="Discord" className="h-6 w-6" />,
+            <FiGithub key="github" size={24} />,
           ]}
         />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/page.tsx` around lines 17 - 22, The Image entries (telegram, discord)
render at intrinsic SVG sizes while the react-icons (FiInstagram, FiLinkedin,
FiFacebook, FiGithub) inherit text size, producing inconsistent icon sizing;
update the Image components and icon usages to a shared explicit size (e.g., add
width/height props or a common CSS class like "icon-size" to the Image elements
and pass a matching size prop or className to FiInstagram, FiLinkedin,
FiFacebook, FiGithub) so all icons (telegram, discord, and the Fi* icons) render
at the same dimensions and visual rhythm.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/app/page.tsx`:
- Around line 17-22: The Image entries (telegram, discord) render at intrinsic
SVG sizes while the react-icons (FiInstagram, FiLinkedin, FiFacebook, FiGithub)
inherit text size, producing inconsistent icon sizing; update the Image
components and icon usages to a shared explicit size (e.g., add width/height
props or a common CSS class like "icon-size" to the Image elements and pass a
matching size prop or className to FiInstagram, FiLinkedin, FiFacebook,
FiGithub) so all icons (telegram, discord, and the Fi* icons) render at the same
dimensions and visual rhythm.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4a8daa6c-40cc-4324-a882-6a9febadcc99

📥 Commits

Reviewing files that changed from the base of the PR and between 3a175e6 and 828ef94.

📒 Files selected for processing (1)
  • src/app/page.tsx

@BIA3IA BIA3IA merged commit fa2857d into main Apr 9, 2026
2 checks passed
@BIA3IA BIA3IA deleted the bianca/card-multiple-icons branch April 9, 2026 21:21
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.

CardMultipleIcons

3 participants