SVG

TwebSVG

{icon, size, stroke}
/**
 * @param {string} icon - Icon identifier/key.
 * @param {number} [size] - Icon size (default: 24).
 * @param {number} [stroke] - Icon stroke (default: 1.5).
 */
block.json
"testIcon": {
	"type": "string",
	"default": "map-pin-heart"
},
index.js
import {
	TwebSVG,
} from '@tigriweb/components/primitives';
index.js | edit()
<TwebSVG
	icon={ attributes.testIcon }
	size={ 24 }
	stroke={ 1.5 }
/>

Important: You Need to Enqueue Icons Globally!

Last updated