I have a collection of unique custom SVGs, each with its own distinct viewBox.
First Custom SVG
<svg viewBox="-4 -4 24 24"><path something/></svg>
Second Custom SVG
<svg viewBox="-5 -7 24 24"><path something/></svg>
Third Custom SVG
<svg viewBox="-2 -1 24 24"><path something/></svg>
And so forth...
I am utilizing the Material UI component: SvgIcon
.
<SvgIcon
component={component} // Here lies my personalized SVG
/>
The default view for SvgIcon
is '0 0 24 24'
, which is applied to all SVGs. I aim to have it inherit from the component
instead.
I understand I can specify a property like:
<SvgIcon
component={component}
viewBox="my values" // For example, "0 0 20 20"
/>
However, since the viewBox
differs among different SVGs,