0.1.1 • Published 2 years ago

@yoondumbo/render-svg v0.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

renderSvg

This library helps you render svg in a react.

install

npm i @yoondumbo/render-svg

or

yarn add @yoondumbo/render-svg

example

import React from 'react';
import { RenderSvg } from  '@yoondumbo/render-svg';

function Example() {
  const url = "s3:sample/sample.svg"
  return (
    <RenderSvg url={url}>
  )
}

or

DivertedImageRendering is available if the image extension is not svg. This package helps you render generic img elements if they are not svg

import React from 'react';
import { DivertedImageRendering } from '@yoondumbo/render-svg';

function Example() {
  const urls = ["s3:sample/sample.png", "s3:sample/sample.svg"]
  return urls.map((_, img) => (
    <DivertedImageRendering url={img} key={img} />
  ))
}
0.1.1

2 years ago

0.1.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago