Skip to content

base react component for inline svg, perfectly baseline aligned with font.

Notifications You must be signed in to change notification settings

wzhscript/react-inline-svg-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-inline-svg-base

Base react component for inline svg, perfectly baseline aligned with font.

instalation

npm install react-inline-svg-base --save

Usage

import React, {Component} from 'react';
import SvgBase from 'react-inline-svg-base';
import 'react-inline-svg-base/style.css';

export default class Home extends Component {
    render() {
        return (
            <SvgBase>
                <svg viewBox="0 0 2048 1792" >
                    <path d="M1856 992v-832q0-13-9.5-22.5t-22.5-9.5h-1600q-13 0-22.5 9.5t-9.5 22.5v832q0 13 9.5 22.5t22.5 9.5h1600q13 0 22.5-9.5t9.5-22.5zm128-832v1088q0 66-47 113t-113 47h-544q0 37 16 77.5t32 71 16 43.5q0 26-19 45t-45 19h-512q-26 0-45-19t-19-45q0-14 16-44t32-70 16-78h-544q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1600q66 0 113 47t47 113z"/>
                </svg>
            </SvgBase>
        );
    }
}

Licence

MIT

About

base react component for inline svg, perfectly baseline aligned with font.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published