fix: SVG icons now scale properly with CSS instead of fixed width/height

- Remove hardcoded width/height attributes from SVGs
- Use CSS (width:100%;height:100%) for proper scaling
- Fixes amenity icons appearing compacted/overlapping
- viewBox maintains aspect ratio, CSS controls display size
This commit is contained in:
2026-07-01 21:59:22 -05:00
parent 09bbe0a441
commit d730961c96
2 changed files with 12 additions and 7 deletions
+3 -2
View File
@@ -497,9 +497,10 @@ export default function RoomsPage() {
<span
style={{ display: 'inline-flex', alignItems: 'center', justifyContent: 'center', width: '16px', height: '16px' }}
dangerouslySetInnerHTML={{ __html: amenity.icon_svg
.replace(/width="[^"]*"/g, 'width="16"')
.replace(/height="[^"]*"/g, 'height="16"')
.replace(/width="[^"]*"/g, '')
.replace(/height="[^"]*"/g, '')
.replace(/stroke="currentColor"/g, `stroke="${navy}"`)
.replace(/<svg/, '<svg style="width:100%;height:100%"')
}}
/>
) : null}