Comments (4)
Thanks for fast response! It works.
This compiles fine:
const beforeInject = (svg: SVGElement) => {
svg.style.backgroundImage = `url(${texture.url})`
svg.style.width = `${size.width}px`,
svg.style.clipPath = `url(#${id})`
}
from svg-injector.
Ah, good catch. It should probably be an SVGElement
. I'll see what's involved in changing it 👍
from svg-injector.
PR has built successfully, so I'll merge it and create a release for react-svg
. Will post back here once that's done.
from svg-injector.
Ok, released [email protected]
if you want to try that out?
from svg-injector.
Related Issues (20)
- Sometimes svg is not injected HOT 1
- Accessing original element in beforeEach HOT 5
- Fallback at httpRequest.responseXML instanceof Document check HOT 5
- Wrong clipPath ids - uniqueId not set properly on clip-path style attribute HOT 1
- renumerateIRIElements for path defs HOT 10
- SVG sprite support
- httpRequest.overrideMimeType('text/xml') error in old chromium versions
- prevent injection if image type is wrong
- CORS issue when referencing SVGs from CDN. HOT 4
- Dependency Dashboard
- Class name is not set correctly HOT 5
- Injecting from `<img>` should takes its attributes HOT 14
- Dynamically change color of SVG with JS HOT 6
- cannot install - not in the registry HOT 7
- Action Required: Fix Renovate Configuration
- Cache only if successful response HOT 5
- Cookie: token value is not adding while image call HOT 1
- Can't import in browser HOT 3
- IE11 support HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svg-injector.