How to use the @iconify/iconify.getVersion function in @iconify/iconify

To help you get started, we’ve selected a few @iconify/iconify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github iconify / iconify-figma / ui / src / components / containers / github.jsx View on Github external
function GitHubContainer(props) {
	let version = Iconify.getVersion(),
		majorVersion = version.split('.').shift();

	const text = {
		code:
			'',
		codeImport: "import Iconify from '@iconify/iconify';",
		sample: '<span data-icon="fa-home" class="iconify"></span>',
		sample2:
			'',
	};

	return (
github iconify / iconify-figma / ui / src / components / parts / code / html.jsx View on Github external
function HTMLCodeBlock(props) {
	let icon = props.icon,
		name = icon.icon.prefix + ':' + icon.icon.name;

	let version = Iconify.getVersion(),
		majorVersion = version.split('.').shift();

	let attribs = [],
		styles = [];

	if (icon.hasColor && icon.color) {
		styles.push('color: ' + icon.color + ';');
	}
	if (icon.height) {
		styles.push('font-size: ' + icon.height + 'px;');
	}

	if (styles.length) {
		attribs.push(' style="' + styles.join(' ') + '"');
	}

@iconify/iconify

Unified SVG framework with over 100,000 icons to choose from

MIT
Latest version published 1 year ago

Package Health Score

61 / 100
Full package analysis

Similar packages