1.0.0 • Published 12 months ago

@remyar/react-mtg-svg v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

react-mtg-svg

Mtg Icon in svg for react

Installation

This library was built with React >=18 in mind. It might work on lower versions as well, but the lib is developed for and tested on those versions.

npm install @remyar/react-mtg-svg --save

Usage

The lib exposes the following component:

class is optionnal height is optionnal width is optionnal

MtgSvg

import MtgSvg from '../mtgSvg'
...

function YourReactComponent(props) {
    return <div>
        <MtgSvg
            svgName={"svg_" + block.code}
            class={"rarity_" + card.rarity}
            height="24px"
            width="24px"
        />
        </div>
}

export default YourReactComponent;
1.0.0

12 months ago