mirror of
https://github.com/OFFIS-ESC/constellation-analyzer
synced 2026-01-26 23:43:40 +00:00
fix: correct Material-UI icon prop usage in RightPanel
Fixed TypeScript build errors by replacing invalid `style` prop with
proper Material-UI icon props. Icon components only accept `fontSize`
and `className` props, not arbitrary style objects.
Changes:
- Move fontSize styling to wrapping div elements
- Use proper `fontSize="small"` prop on icon components
- Apply color styling to container div (unchanged)
This resolves two TypeScript errors at lines 565 and 597 where
`style={{ fontSize: '14px' }}` was incorrectly passed to MUI icons.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
2db8b25d9e
commit
2435c984ba
1 changed files with 4 additions and 4 deletions
|
|
@ -561,8 +561,8 @@ const RightPanel = ({ selectedNode, selectedEdge, onClose }: Props) => {
|
|||
return (
|
||||
<>
|
||||
{IconComponent && (
|
||||
<div className="flex-shrink-0" style={{ color: sourceType?.color }}>
|
||||
<IconComponent style={{ fontSize: '14px' }} />
|
||||
<div className="flex-shrink-0" style={{ color: sourceType?.color, fontSize: '14px' }}>
|
||||
<IconComponent fontSize="small" />
|
||||
</div>
|
||||
)}
|
||||
<span className="font-medium truncate">{sourceNode?.data?.label || currentEdge.source}</span>
|
||||
|
|
@ -593,8 +593,8 @@ const RightPanel = ({ selectedNode, selectedEdge, onClose }: Props) => {
|
|||
<span className="text-gray-400 text-[10px] flex-shrink-0">({targetType?.label || 'Unknown'})</span>
|
||||
<span className="font-medium truncate">{targetNode?.data?.label || currentEdge.target}</span>
|
||||
{IconComponent && (
|
||||
<div className="flex-shrink-0" style={{ color: targetType?.color }}>
|
||||
<IconComponent style={{ fontSize: '14px' }} />
|
||||
<div className="flex-shrink-0" style={{ color: targetType?.color, fontSize: '14px' }}>
|
||||
<IconComponent fontSize="small" />
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
|
|
|
|||
Loading…
Reference in a new issue