diff --git a/frontend/src/components/ComponentPickerModal.tsx b/frontend/src/components/ComponentPickerModal.tsx index b172bbec..3b47d23e 100644 --- a/frontend/src/components/ComponentPickerModal.tsx +++ b/frontend/src/components/ComponentPickerModal.tsx @@ -343,17 +343,53 @@ const PASSIVE_TAGS = new Set([ 'wokwi-inductor', ]); +// Static illustrations for the Pi Linux family. A live velxio-raspberry-pi-* +// custom element at natural size + CSS scale keeps its unscaled layout box, +// so the 100px thumbnail clips it to a sliver — images render fully instead. +// Keyed by tagName because the registry's Pi Zero/1/2 entries deliberately +// reuse the Pi 3 board art. +const PI_BOARD_ART: Record = { + 'velxio-raspberry-pi-3': raspberryPi3Svg, + 'velxio-raspberry-pi-4': raspberryPi4Png, + 'velxio-raspberry-pi-5': raspberryPi5Png, +}; + +/** Gold PRO pill shown on cards for paid-gated boards (Pi Linux + STM32). */ +const ProBadge: React.FC = () => ( + + PRO + +); + const ComponentCard: React.FC = ({ component, onSelect }) => { const thumbnailRef = React.useRef(null); const usePresetSvg = PASSIVE_TAGS.has(component.tagName) && typeof component.thumbnail === 'string' && component.thumbnail.trim().startsWith(' { if (!thumbnailRef.current) return; if (usePresetSvg) return; // SVG is rendered via dangerouslySetInnerHTML below + if (boardArt) return; // static illustration rendered below // Create the actual wokwi element const element = document.createElement(component.tagName); @@ -397,12 +433,19 @@ const ComponentCard: React.FC = ({ component, onSelect }) => thumbnailRef.current.innerHTML = ''; } }; - }, [component.tagName, component.defaultValues, usePresetSvg]); + }, [component.tagName, component.defaultValues, usePresetSvg, boardArt]); return ( -