'Is it possible to make SVG equal to path?

Helo I have a problem. I am using npm package which provides pack of weather icons. The problem is the SVG box is big and it breaks positioning that is a lot of white space on website, it does not look nice. Is negative margin the way>

import {wiCloudy} from 'weather-icons-react'

const WeatherDataBox = () => { 
   return (
 icon=<WiCloudy size={256}  />

)}



<svg stroke="currentColor" fill="currentColor"
    stroke-width="0" viewBox="0 0 30 30" 
    attr="[object Object]" size="256" height="256" width="256">
   <path>*long code*</path>
</svg>


Solution 1:[1]

I changed viewbox and it reduced empty background

let ICON_SIZE = 256
let VIEWBOX = "5 5 20 20"
<WiCloudy viewBox={VIEWBOX}  size={ICON_SIZE}  />

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kay