Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1007 Bytes

README.md

File metadata and controls

42 lines (32 loc) · 1007 Bytes

react-country-flag

React component for emoji/svg country flags.

NPM JavaScript Style Guide

Install

npm install --save react-country-flag

Usage

import React, { Component } from "react";

import ReactCountryFlag from "react-country-flag";

class Example extends Component {
    render() {
        return (
            <div>
                <ReactCountryFlag code="us" />
                <ReactCountryFlag code="us" svg />
                <ReactCountryFlag 
                    styleProps={{
                        width: '20px',
                        height: '20px'
                    }}
                    code="us"
                    svg
                />
            </div>
        );
    }
}

License

MIT © danalloway