Skip to content

Commit 4681b87

Browse files
waleedlatif1claude
andcommitted
fix(emcn): rename Info icon to CircleInfo to resolve barrel collision
The toast redesign added an `Info` icon, but the emcn barrel already re-exports an `Info` component (`export * from './components'` + `export * from './icons'`), so the top-level `@/components/emcn` had a duplicate `Info` export (TS2308). Rename the icon to CircleInfo — matching its circle-shaped siblings (CircleAlert, CircleCheck) and resolving the collision. The icon is consumed only by toast.tsx. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a6f4e2d commit 4681b87

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

apps/sim/components/emcn/components/toast/toast.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { Chip } from '@/components/emcn/components/chip/chip'
2222
import { Bell } from '@/components/emcn/icons/bell'
2323
import { CircleAlert } from '@/components/emcn/icons/circle-alert'
2424
import { CircleCheck } from '@/components/emcn/icons/circle-check'
25-
import { Info } from '@/components/emcn/icons/info'
25+
import { CircleInfo } from '@/components/emcn/icons/circle-info'
2626
import { TriangleAlert } from '@/components/emcn/icons/triangle-alert'
2727
import { X } from '@/components/emcn/icons/x'
2828
import { cn } from '@/lib/core/utils/cn'
@@ -88,7 +88,7 @@ type ToastVariant = 'default' | 'info' | 'success' | 'warning' | 'error'
8888
*/
8989
const VARIANT_ICON: Record<ToastVariant, ComponentType<SVGProps<SVGSVGElement>>> = {
9090
default: Bell,
91-
info: Info,
91+
info: CircleInfo,
9292
success: CircleCheck,
9393
warning: TriangleAlert,
9494
error: CircleAlert,

apps/sim/components/emcn/icons/info.tsx renamed to apps/sim/components/emcn/icons/circle-info.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import type { SVGProps } from 'react'
22

33
/**
4-
* Info icon component - circular info used for info intent.
4+
* CircleInfo icon — a circled "i", used for the info intent. Named for its
5+
* shape to match its siblings (`CircleAlert`, `CircleCheck`) and to avoid
6+
* colliding with the `Info` component re-exported from the emcn barrel.
57
* @param props - SVG properties including className, fill, etc.
68
*/
7-
export function Info(props: SVGProps<SVGSVGElement>) {
9+
export function CircleInfo(props: SVGProps<SVGSVGElement>) {
810
return (
911
<svg
1012
xmlns='http://www.w3.org/2000/svg'

apps/sim/components/emcn/icons/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export { Check } from './check'
1616
export { ChevronDown } from './chevron-down'
1717
export { CircleAlert } from './circle-alert'
1818
export { CircleCheck } from './circle-check'
19+
export { CircleInfo } from './circle-info'
1920
export { Clipboard } from './clipboard'
2021
export { ClipboardList } from './clipboard-list'
2122
export { Clock } from './clock'
@@ -46,7 +47,6 @@ export { HelpCircle } from './help-circle'
4647
export { HexSimple } from './hex-simple'
4748
export { Home } from './home'
4849
export { ImageUp } from './image-up'
49-
export { Info } from './info'
5050
export { Integration } from './integration'
5151
export { Key } from './key'
5252
export { KeySquare } from './key-square'

0 commit comments

Comments
 (0)