perf(P6A.T4): wrap all icon components in React.memo
All 57 exported SVG icon components in icons.tsx are now memoised via React.memo, giving React permission to skip re-renders when props are referentially equal. Consumer icon-prop types updated from the legacy SVGProps (includes string refs) to ComponentPropsWithoutRef<'svg'> so the MemoExoticComponent return type satisfies TypeScript without casts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -197,7 +197,7 @@ function HeaderBar({
|
||||
|
||||
interface HeaderActionButtonProps {
|
||||
label: string;
|
||||
icon: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
|
||||
icon: React.ComponentType<React.ComponentPropsWithoutRef<'svg'>>;
|
||||
onClick?: () => void;
|
||||
disabled?: boolean;
|
||||
tone?: 'default' | 'accent';
|
||||
|
||||
Reference in New Issue
Block a user