diff --git a/src/Playroom/Frames/Frames.tsx b/src/Playroom/Frames/Frames.tsx index d4888d28..5a06ffe6 100644 --- a/src/Playroom/Frames/Frames.tsx +++ b/src/Playroom/Frames/Frames.tsx @@ -21,7 +21,11 @@ export default function Frames({ code, themes, widths }: FramesProps) { const scrollingPanelRef = useRef(null); const frames = flatMap(widths, (width) => - themes.map((theme) => ({ theme, width })) + themes.map((theme) => ({ + theme, + width, + widthName: `${width}${/\d$/.test(width.toString()) ? 'px' : ''}`, + })) ); let renderCode = code; @@ -54,14 +58,11 @@ export default function Frames({ code, themes, widths }: FramesProps) {
{frame.theme === '__PLAYROOM__NO_THEME__' ? ( - - {frame.width} - px - + {frame.widthName} ) : ( {frame.theme} - {` \u2013 ${frame.width}px`} + {` \u2013 ${frame.widthName}`} )}