@vkontakte/icons-sprite
Advanced tools
Comparing version 1.0.0 to 1.0.1
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs"; | ||
import { BrowserSymbol } from "./browser-symbol"; | ||
var namespaceURI = "http://www.w3.org/2000/svg"; | ||
export var BrowserSprite = /*#__PURE__*/ function() { | ||
@@ -11,3 +12,3 @@ "use strict"; | ||
attrs: { | ||
"xmlns": "http://www.w3.org/2000/svg", | ||
"xmlns": namespaceURI, | ||
"xmlns:xlink": "http://www.w3.org/1999/xlink", | ||
@@ -65,3 +66,3 @@ "style": "position:absolute;width:0;height:0", | ||
_proto.render = function render() { | ||
var el = document.createElement("svg"); | ||
var el = document.createElementNS(namespaceURI, "svg"); | ||
Object.entries(this.config.attrs).forEach(function(entry) { | ||
@@ -68,0 +69,0 @@ return el.setAttribute(entry[0], entry[1]); |
@@ -13,2 +13,3 @@ "use strict"; | ||
var _browserSymbol = require("./browser-symbol"); | ||
var namespaceURI = "http://www.w3.org/2000/svg"; | ||
var BrowserSprite = /*#__PURE__*/ function() { | ||
@@ -22,3 +23,3 @@ "use strict"; | ||
attrs: { | ||
"xmlns": "http://www.w3.org/2000/svg", | ||
"xmlns": namespaceURI, | ||
"xmlns:xlink": "http://www.w3.org/1999/xlink", | ||
@@ -76,3 +77,3 @@ "style": "position:absolute;width:0;height:0", | ||
_proto.render = function render() { | ||
var el = document.createElement("svg"); | ||
var el = document.createElementNS(namespaceURI, "svg"); | ||
Object.entries(this.config.attrs).forEach(function(entry) { | ||
@@ -79,0 +80,0 @@ return el.setAttribute(entry[0], entry[1]); |
{ | ||
"name": "@vkontakte/icons-sprite", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"homepage": "https://vkcom.github.io/icons/", | ||
@@ -29,3 +29,3 @@ "repository": "https://github.com/VKCOM/icons", | ||
"@types/node": "^18.13.0", | ||
"@types/react": "16.14.0", | ||
"@types/react": "16.14.34", | ||
"concurrently": "^7.6.0", | ||
@@ -32,0 +32,0 @@ "jest": "^29.4.2", |
import { BrowserSymbol } from './browser-symbol'; | ||
const namespaceURI = 'http://www.w3.org/2000/svg'; | ||
export interface SpriteConfig { | ||
@@ -11,3 +13,3 @@ attrs?: Record<string, string>; | ||
attrs: { | ||
'xmlns': 'http://www.w3.org/2000/svg', | ||
'xmlns': namespaceURI, | ||
'xmlns:xlink': 'http://www.w3.org/1999/xlink', | ||
@@ -80,3 +82,3 @@ 'style': 'position:absolute;width:0;height:0', | ||
private render() { | ||
const el = document.createElement('svg'); | ||
const el = document.createElementNS(namespaceURI, 'svg'); | ||
@@ -83,0 +85,0 @@ Object.entries(this.config.attrs!).forEach((entry) => el.setAttribute(entry[0], entry[1])); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79036
60
1145