npm.io
2.0.1 • Published 5 years ago

kodobe-react-badge

Licence
ISC
Version
2.0.1
Deps
1
Size
5 kB
Vulns
0
Weekly
0

Kodobe React Badge

This is a simple react badge package

Install

npm install kodobe-react-badge

or

yarn add kodobe-react-badge

Setup

import Badge from 'kodobe-react-badge';

Usage

import Badge from "kodobe-react-badge";

function App() {
    return (
        <div>
            <h3>Here is how to use a badge</h3>
             <br />
            <Badge count={"8"}>
                <p>Hello world</p>
            </Badge>
            <br />
            <Badge count={"10"}>
                <div className="simpleBox" />
            </Badge>
            <br />
            <Badge count={"2000"} />
        </div>
    );
}

Options

  • children: Any thing, Badge becomes standalone if empty
  • count: (string, required)
  • style: style object
  • className: string

Keywords