The plugin runs all imported SVG files through svgo. For index.html, you can use the following syntax: ```html <use svg="file.svg" size="24" /> ``` For scripts, use the `?svg` import query ```javascript import SVG_FILE from './file.svg?svg&size=24 ``` Note: size is shorthand for specifying both width and height individually. You can also set any property of the base SVG element. You can also use the `?svg&icon` query to return a function that allows dynamically resizing the SVG string.
6 lines
No EOL
309 B
XML
6 lines
No EOL
309 B
XML
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"
|
|
fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
|
stroke-linejoin="round">
|
|
<rect x="6" y="4" width="4" height="16"></rect>
|
|
<rect x="14" y="4" width="4" height="16"></rect>
|
|
</svg> |