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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user