preact-svg
v1.6.0
Published
Use SVG with Preact.
Downloads
117
Readme
preact-svg
An <SVG>
wrapper component that makes inline <svg>
work in Preact.
Usage Example
import SVG from 'preact-svg';
import { h, render } from 'preact';
/** @jsx h */
const Main = () => (
<SVG width="100" height="50">
<path d="M0,0T 50,50 100,50 50,100Z" stroke="#000" stroke-width="2" />
</SVG>
);
render(<Main />, document.body);