1.0.0-16 • Published 6 years ago

@react-spectre/badge v1.0.0-16

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

@react-spectre/badge

React components for Spectre.css's badges.

Installation

yarn add @react-spectre/badge
npm install @react-spectre/badge --save

Usage

Badges

There is 1 single component used for badges: Badge.

import { Badge } from '@react-spectre/badge'

Badges are used as wrapper components with the label property (this property is optional, badge will appear empty if the label is not specified). You can use badge for span, buttons and figures.

<Badge label={1}>
  <span>Notifications</span>
</Badge>
    
<Badge label={2}>
  <Button>Badge Button</Button>
</Badge>
  
<Badge label={11}>
  <Figure className="avatar">
    <Image
      responsive
      src="https://picturepan2.github.io/spectre/img/avatar-1.png"
    />
  </Figure>
</Badge>

Made with :heart: by Rubens Mariuzzo.

MIT License