1.0.1 • Published 6 years ago

react-svgporn v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

react-svgporn

Build Status NPM Version License Coverage Status

A React Wrapper for Svgporn.

Install

npm i react-svgporn

Usage

import Logo from 'react-svgporn';

ReactDOM.render(
  <Logo name="React" width={320}/>,
  document.getElementById('logo')
);

yields

<img src="https://cdn.svgporn.com/logos/react.svg" width="320">

If there are multiple logos you can use type to filter them.

<Logo name="Github"/>
<Logo name="Github" type="octocat"/>

name is case-ignorant and matched by levenstein distance.

// These 3 logos renders the same image!
<Logo name="MongoDB"/>
<Logo name="mongodb"/>
<Logo name="mongo"/>

LICENSE

MIT

1.0.1

6 years ago

1.0.0

7 years ago

0.3.1

7 years ago