Skip to content

feat: add icons to ComponentContext#3246

Open
arnautov-anton wants to merge 3 commits into
masterfrom
add-icons-to-component-context
Open

feat: add icons to ComponentContext#3246
arnautov-anton wants to merge 3 commits into
masterfrom
add-icons-to-component-context

Conversation

@arnautov-anton

@arnautov-anton arnautov-anton commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

🎯 Goal

Adds ability to override icons through the component context.

Ref: GetStream/stream-chat-react-native#3731

Summary by CodeRabbit

  • New Features

    • Added centralized icon customization through component context across chat, messaging, attachments, dialogs, forms, media, polls, reactions, and channel views.
    • Added shared icon slot types for configuring available icon overrides.
    • Existing custom icon props remain supported, with deprecation guidance where context-based customization is preferred.
  • Bug Fixes

    • Improved nested icon override merging so parent customizations are preserved when additional overrides are supplied.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds typed icon override slots to ComponentContext, merges nested icon overrides, and updates components across attachments, messaging, composer, dialogs, plugins, and media flows to resolve contextual icons with existing defaults as fallbacks. Deprecated icon props retain compatibility precedence.

Changes

Context-driven icon customization

Layer / File(s) Summary
Icon slot contract and propagation
src/components/Icons/*, src/context/*, src/components/Avatar/Avatar.tsx, src/plugins/Emojis/EmojiPicker.tsx
Adds typed icon slots, exposes them through component context, merges nested overrides, and preserves explicit icon prop precedence.
Shared component icon resolution
src/components/Attachment/*, src/components/Badge/*, src/components/Dialog/*, src/components/Form/*, src/components/Gallery/*, src/components/MediaRecorder/*
Replaces fixed icon usage with contextual icons and default fallbacks across shared UI components.
Composer and message icon flows
src/components/MessageComposer/*, src/components/Message/*, src/components/MessageActions/*, src/components/MessageList/*, src/components/Notifications/*
Applies contextual icon selection to composer controls, attachment previews, message actions, status indicators, lists, and notifications.
Plugin integration and validation
src/plugins/ChannelDetail/*, src/plugins/Emojis/*, src/plugins/*/__tests__/*
Wires icon overrides into channel detail and related plugin views, and updates affected context mocks in tests.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: oliverlaz, martincupela

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the goal but is missing the required implementation details and UI changes sections from the template. Add the ### 🛠 Implementation details and ### 🎨 UI Changes sections, and briefly summarize the context icon override work and any screenshots or note none.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.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 is concise and accurately summarizes the main change: adding icon overrides to ComponentContext.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-icons-to-component-context

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.

@github-actions

Copy link
Copy Markdown

Size Change: +5.54 kB (+0.63%)

Total Size: 886 kB

📦 View Changed
Filename Size Change
dist/cjs/channel-detail.js 23.5 kB +593 B (+2.59%)
dist/cjs/emojis.js 2.6 kB +35 B (+1.36%)
dist/cjs/index.js 294 kB +1.9 kB (+0.65%)
dist/cjs/ReactPlayerWrapper.js 546 B -1 B (-0.18%)
dist/cjs/useChannelHeaderOnlineStatus.js 41.3 kB +275 B (+0.67%)
dist/cjs/useNotificationApi.js 57.5 kB +91 B (+0.16%)
dist/es/channel-detail.mjs 23 kB +431 B (+1.91%)
dist/es/emojis.mjs 2.52 kB +42 B (+1.69%)
dist/es/index.mjs 291 kB +1.79 kB (+0.62%)
dist/es/useChannelHeaderOnlineStatus.mjs 40.8 kB +304 B (+0.75%)
dist/es/useMessageComposerController.mjs 937 B +2 B (+0.21%)
dist/es/useNotificationApi.mjs 56.2 kB +88 B (+0.16%)
ℹ️ View Unchanged
Filename Size
dist/cjs/audioProcessing.js 1.74 kB
dist/cjs/mp3-encoder.js 814 B
dist/cjs/useMessageComposerController.js 1.01 kB
dist/css/channel-detail.css 2.84 kB
dist/css/emoji-picker.css 178 B
dist/css/emoji-replacement.css 456 B
dist/css/index.css 41.4 kB
dist/es/audioProcessing.mjs 1.65 kB
dist/es/mp3-encoder.mjs 768 B
dist/es/ReactPlayerWrapper.mjs 485 B

compressed-size-action

@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: 1

🧹 Nitpick comments (4)
src/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.tsx (1)

62-67: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consolidate redundant useComponentContext calls.

Both components fetch from useComponentContext() multiple times in a row. You can consolidate these calls into a single destructuring statement to clean up the component bodies.

  • src/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.tsx#L62-L67: combine the icons and Avatar lookups into one hook call in ChannelManagementInfoBody.
  • src/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.tsx#L323-L324: combine the icons and Avatar lookups into one hook call in ChannelManagementEditBody.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.tsx`
around lines 62 - 67, Consolidate the adjacent useComponentContext calls in
ChannelManagementInfoBody at
src/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.tsx
lines 62-67 into one destructuring statement containing both icons and Avatar,
preserving their existing defaults. Apply the same consolidation in
ChannelManagementEditBody at lines 323-324; both sites require direct changes.
src/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersBrowseView.tsx (1)

82-100: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Hoist the hook call to the parent component.

useComponentContext is currently called inside a dynamically created function (MemberTrailingSlot). Depending on how the layout component invokes TrailingSlot (as a render prop TrailingSlot() vs a component <TrailingSlot />), this might violate the Rules of Hooks. Hoisting it to the top level of ChannelMembersBrowseViewItem is safer and more idiomatic.

♻️ Proposed refactor
-  const TrailingSlot = useMemo(
-    () =>
-      function MemberTrailingSlot() {
-        const { icons: { IconMute = DefaultIconMute } = {} } = useComponentContext();
-        return (
-          <div className='str-chat__channel-detail__channel-members-view__list-item__trailing-slot'>
-            {roleTranslation ? (
-              <span className='str-chat__channel-detail__channel-members-view__role-label'>
-                {roleTranslation}
-              </span>
-            ) : null}
-            {isMuted ? (
-              <IconMute className='str-chat__channel-detail__channel-members-view__list-item__indicator-icon str-chat__channel-detail__channel-members-view__list-item__indicator-icon--mute' />
-            ) : null}
-          </div>
-        );
-      },
-    [isMuted, roleTranslation],
-  );
+  const { icons: { IconMute = DefaultIconMute } = {} } = useComponentContext();
+
+  const TrailingSlot = useMemo(
+    () =>
+      function MemberTrailingSlot() {
+        return (
+          <div className='str-chat__channel-detail__channel-members-view__list-item__trailing-slot'>
+            {roleTranslation ? (
+              <span className='str-chat__channel-detail__channel-members-view__role-label'>
+                {roleTranslation}
+              </span>
+            ) : null}
+            {isMuted ? (
+              <IconMute className='str-chat__channel-detail__channel-members-view__list-item__indicator-icon str-chat__channel-detail__channel-members-view__list-item__indicator-icon--mute' />
+            ) : null}
+          </div>
+        );
+      },
+    [isMuted, roleTranslation, IconMute],
+  );
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersBrowseView.tsx`
around lines 82 - 100, Move the useComponentContext call out of the dynamically
created MemberTrailingSlot function and invoke it at the top level of
ChannelMembersBrowseViewItem. Derive the IconMute fallback there, then have
MemberTrailingSlot reuse that value while preserving the existing mute and
role-label rendering.
src/components/MessageComposer/AttachmentPreviewList/GeolocationPreview.tsx (1)

12-15: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the deprecated string argument.

The _componentName parameter in useComponentContext is marked as @deprecated. It is recommended to call the hook without any arguments.

♻️ Proposed refactor
 const GeolocationPreviewImage = () => {
-  const { icons: { IconLocation = DefaultIconLocation } = {} } = useComponentContext(
-    'GeolocationPreviewImage',
-  );
+  const { icons: { IconLocation = DefaultIconLocation } = {} } = useComponentContext();
   return (
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/MessageComposer/AttachmentPreviewList/GeolocationPreview.tsx`
around lines 12 - 15, Update GeolocationPreviewImage to call useComponentContext
without the deprecated string argument, while preserving the existing icons
destructuring and DefaultIconLocation fallback.
src/components/MessageActions/MessageActions.defaults.tsx (1)

94-94: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Merge duplicate useComponentContext invocations.

useComponentContext() is already invoked earlier in this action function (around line 80) to retrieve ReactionSelector. You can consolidate these calls into a single destructuring statement.

♻️ Proposed refactor
     React() {
-      const { ReactionSelector = DefaultReactionSelector } = useComponentContext();
       const { anchorReferenceElement } = useContextMenuContext();
       const { isMyMessage, message, threadList } = useMessageContext();
@@ -91,3 +90,5 @@
       const dialogIsOpen = useDialogIsOpen(dialogId, dialogManager?.id);
 
-      const { icons: { IconEmoji = DefaultIconEmoji } = {} } = useComponentContext();
+      const {
+        icons: { IconEmoji = DefaultIconEmoji } = {},
+        ReactionSelector = DefaultReactionSelector,
+      } = useComponentContext();
       return (
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/MessageActions/MessageActions.defaults.tsx` at line 94, Merge
the later useComponentContext() call used to obtain IconEmoji into the earlier
invocation that retrieves ReactionSelector in the same action function. Extend
the existing destructuring to read both values, preserving DefaultIconEmoji as
the fallback when icons or IconEmoji are unavailable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/Badge/MediaBadge.tsx`:
- Around line 17-30: Update the voice entry in MediaBadge’s
mediaBadgeVariantToIcon mapping to use the exact MediaBadgeVariant value
"voice-recording" instead of "voiceRecording", while preserving the existing
microphone icon mapping.

---

Nitpick comments:
In `@src/components/MessageActions/MessageActions.defaults.tsx`:
- Line 94: Merge the later useComponentContext() call used to obtain IconEmoji
into the earlier invocation that retrieves ReactionSelector in the same action
function. Extend the existing destructuring to read both values, preserving
DefaultIconEmoji as the fallback when icons or IconEmoji are unavailable.

In `@src/components/MessageComposer/AttachmentPreviewList/GeolocationPreview.tsx`:
- Around line 12-15: Update GeolocationPreviewImage to call useComponentContext
without the deprecated string argument, while preserving the existing icons
destructuring and DefaultIconLocation fallback.

In
`@src/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.tsx`:
- Around line 62-67: Consolidate the adjacent useComponentContext calls in
ChannelManagementInfoBody at
src/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.tsx
lines 62-67 into one destructuring statement containing both icons and Avatar,
preserving their existing defaults. Apply the same consolidation in
ChannelManagementEditBody at lines 323-324; both sites require direct changes.

In
`@src/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersBrowseView.tsx`:
- Around line 82-100: Move the useComponentContext call out of the dynamically
created MemberTrailingSlot function and invoke it at the top level of
ChannelMembersBrowseViewItem. Derive the IconMute fallback there, then have
MemberTrailingSlot reuse that value while preserving the existing mute and
role-label rendering.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 954d8a21-faf0-4bb8-bc63-0199423c5c8d

📥 Commits

Reviewing files that changed from the base of the PR and between 20936d6 and da9db39.

📒 Files selected for processing (103)
  • src/components/Attachment/Geolocation.tsx
  • src/components/Attachment/Giphy.tsx
  • src/components/Attachment/LinkPreview/Card.tsx
  • src/components/Attachment/LinkPreview/CardAudio.tsx
  • src/components/Attachment/ModalGallery.tsx
  • src/components/Attachment/UnsupportedAttachment.tsx
  • src/components/Attachment/VisibilityDisclaimer.tsx
  • src/components/Attachment/components/DownloadButton.tsx
  • src/components/Avatar/Avatar.tsx
  • src/components/Badge/Badge.tsx
  • src/components/Badge/MediaBadge.tsx
  • src/components/BaseImage/ImagePlaceholder.tsx
  • src/components/Button/PlayButton.tsx
  • src/components/ChannelListItem/ChannelListItemActionButtons.defaults.tsx
  • src/components/ChannelListItem/ChannelListItemUI.tsx
  • src/components/ChatView/ChatView.tsx
  • src/components/Dialog/components/Callout.tsx
  • src/components/Dialog/components/ContextMenu.tsx
  • src/components/Dialog/components/Prompt.tsx
  • src/components/Dialog/components/Viewer.tsx
  • src/components/EmptyStateIndicator/EmptyStateIndicator.tsx
  • src/components/Form/NumericInput.tsx
  • src/components/Form/TextInput.tsx
  • src/components/Gallery/GalleryHeader.tsx
  • src/components/Gallery/GalleryUI.tsx
  • src/components/Icons/index.ts
  • src/components/Icons/slots.ts
  • src/components/Loading/LoadingIndicator.tsx
  • src/components/Location/ShareLocationDialog.tsx
  • src/components/MediaRecorder/AudioRecorder/AudioRecorderRecordingControls.tsx
  • src/components/MediaRecorder/AudioRecorder/AudioRecordingButtonWithNotification.tsx
  • src/components/MediaRecorder/AudioRecorder/AudioRecordingPlayback.tsx
  • src/components/MediaRecorder/AudioRecorder/AudioRecordingPreview.tsx
  • src/components/MediaRecorder/AudioRecorder/__tests__/AudioRecordingPreview.test.tsx
  • src/components/Message/MessageAlsoSentInChannelIndicator.tsx
  • src/components/Message/MessageDeletedBubble.tsx
  • src/components/Message/MessageStatus.tsx
  • src/components/Message/MessageTranslationIndicator.tsx
  • src/components/Message/PinIndicator.tsx
  • src/components/Message/ReminderNotification.tsx
  • src/components/MessageActions/DownloadSubmenu.tsx
  • src/components/MessageActions/MessageActions.defaults.tsx
  • src/components/MessageActions/RemindMeSubmenu.tsx
  • src/components/MessageBounce/MessageBouncePrompt.tsx
  • src/components/MessageComposer/AttachmentPreviewList/AudioAttachmentPreview.tsx
  • src/components/MessageComposer/AttachmentPreviewList/FileAttachmentPreview.tsx
  • src/components/MessageComposer/AttachmentPreviewList/GeolocationPreview.tsx
  • src/components/MessageComposer/AttachmentPreviewList/MediaAttachmentPreview.tsx
  • src/components/MessageComposer/AttachmentPreviewList/UnsupportedAttachmentPreview.tsx
  • src/components/MessageComposer/AttachmentSelector/AttachmentSelector.tsx
  • src/components/MessageComposer/AttachmentSelector/CommandsMenu.tsx
  • src/components/MessageComposer/AttachmentSelector/__tests__/CommandsMenu.test.tsx
  • src/components/MessageComposer/CommandChip.tsx
  • src/components/MessageComposer/LinkPreviewList.tsx
  • src/components/MessageComposer/MessageComposerActions.tsx
  • src/components/MessageComposer/QuotedMessagePreview.tsx
  • src/components/MessageComposer/RemoveAttachmentPreviewButton.tsx
  • src/components/MessageComposer/SendButton.tsx
  • src/components/MessageComposer/SendToChannelCheckbox.tsx
  • src/components/MessageComposer/WithDragAndDropUpload.tsx
  • src/components/MessageComposer/__tests__/CommandChip.test.tsx
  • src/components/MessageList/ScrollToLatestMessageButton.tsx
  • src/components/MessageList/UnreadMessagesNotification.tsx
  • src/components/MessageList/UnreadMessagesSeparator.tsx
  • src/components/Modal/CloseButtonOnModalOverlay.tsx
  • src/components/Notifications/Notification.tsx
  • src/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.tsx
  • src/components/Poll/PollCreationDialog/OptionFieldSet.tsx
  • src/components/Poll/PollCreationDialog/PollCreationDialogControls.tsx
  • src/components/Poll/PollCreationDialog/PollOptionReorderHandle.tsx
  • src/components/Reactions/MessageReactionsDetail.tsx
  • src/components/Reactions/ReactionSelector.tsx
  • src/components/Reactions/ReactionSelectorWithButton.tsx
  • src/components/SummarizedMessagePreview/SummarizedMessagePreview.tsx
  • src/components/TextareaComposer/SuggestionList/MentionItem/BroadcastMentionItem.tsx
  • src/components/TextareaComposer/SuggestionList/MentionItem/RoleItem.tsx
  • src/components/TextareaComposer/SuggestionList/MentionItem/UserGroupItem.tsx
  • src/components/TextareaComposer/__tests__/CommandItem.test.tsx
  • src/components/Thread/ThreadHeader.tsx
  • src/components/Threads/ThreadList/ThreadListEmptyPlaceholder.tsx
  • src/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.tsx
  • src/components/VideoPlayer/VideoThumbnail.tsx
  • src/context/ComponentContext.tsx
  • src/context/WithComponents.tsx
  • src/plugins/ChannelDetail/ChannelDetail.tsx
  • src/plugins/ChannelDetail/ChannelDetailEmptyList.tsx
  • src/plugins/ChannelDetail/ChannelDetailSearchInput.tsx
  • src/plugins/ChannelDetail/SectionNavigator/SectionNavigatorHeader.tsx
  • src/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesEmptyList.tsx
  • src/plugins/ChannelDetail/Views/ChannelFilesView/__tests__/ChannelFilesView.test.tsx
  • src/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementActions.defaults.tsx
  • src/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.tsx
  • src/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaEmptyList.tsx
  • src/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.tsx
  • src/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberActions.defaults.tsx
  • src/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersAddView.tsx
  • src/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersBrowseView.tsx
  • src/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersHeaderActions.defaults.tsx
  • src/plugins/ChannelDetail/Views/ChannelMembersView/__tests__/ChannelMembersAddView.test.tsx
  • src/plugins/ChannelDetail/Views/ChannelMembersView/__tests__/ChannelMembersBrowseView.test.tsx
  • src/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesEmptyList.tsx
  • src/plugins/ChannelDetail/Views/PinnedMessagesView/__tests__/PinnedMessagesView.test.tsx
  • src/plugins/Emojis/EmojiPicker.tsx

Comment on lines 17 to +30
export const MediaBadge = ({ attachment, variant }: MediaBadgeProps) => {
const Icon = MediaBadgeVariantToIcon[variant];
const {
icons: {
IconMicrophoneSolid = DefaultIconMicrophoneSolid,
IconVideoFill = DefaultIconVideoFill,
} = {},
} = useComponentContext();

const mediaBadgeVariantToIcon: Record<MediaBadgeVariant, ComponentType> = {
video: IconVideoFill,
voiceRecording: IconMicrophoneSolid,
};

const Icon = mediaBadgeVariantToIcon[variant];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Fix variant mapping key to match the exact string type.

The MediaBadgeVariant type defines the voice variant as 'voice-recording', but the mediaBadgeVariantToIcon dictionary uses the camelCased key voiceRecording. Consequently, when variant='voice-recording' is passed, the icon will fail to resolve and render.

🐛 Proposed fix for the dictionary key
   const mediaBadgeVariantToIcon: Record<MediaBadgeVariant, ComponentType> = {
     video: IconVideoFill,
-    voiceRecording: IconMicrophoneSolid,
+    'voice-recording': IconMicrophoneSolid,
   };
📝 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
export const MediaBadge = ({ attachment, variant }: MediaBadgeProps) => {
const Icon = MediaBadgeVariantToIcon[variant];
const {
icons: {
IconMicrophoneSolid = DefaultIconMicrophoneSolid,
IconVideoFill = DefaultIconVideoFill,
} = {},
} = useComponentContext();
const mediaBadgeVariantToIcon: Record<MediaBadgeVariant, ComponentType> = {
video: IconVideoFill,
voiceRecording: IconMicrophoneSolid,
};
const Icon = mediaBadgeVariantToIcon[variant];
export const MediaBadge = ({ attachment, variant }: MediaBadgeProps) => {
const {
icons: {
IconMicrophoneSolid = DefaultIconMicrophoneSolid,
IconVideoFill = DefaultIconVideoFill,
} = {},
} = useComponentContext();
const mediaBadgeVariantToIcon: Record<MediaBadgeVariant, ComponentType> = {
video: IconVideoFill,
'voice-recording': IconMicrophoneSolid,
};
const Icon = mediaBadgeVariantToIcon[variant];
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/Badge/MediaBadge.tsx` around lines 17 - 30, Update the voice
entry in MediaBadge’s mediaBadgeVariantToIcon mapping to use the exact
MediaBadgeVariant value "voice-recording" instead of "voiceRecording", while
preserving the existing microphone icon mapping.

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.

1 participant