I have a library of svg icons in json format, there are keys for the icon name and the path for rendering the icon, these icons are all different dimensions. i have an icon component that consumes the json and makes an svg by inserting the path associated with it.
Here is a stackblitz example: https://angular-qhpqpu.stackblitz.io
The problem im facing is that the viewbox doesnt have the correct ratio for icons that are wider than they are tall. If the icon has a height thats greater than the width, it works perfectly.
When another component consumes the icon component, it never aligns properly on the wide icons because the svg viewbox is not correct.
How can i make the viewbox exactly proportionate to the path inside of it?