1.17.0 • Published 7 months ago

@asphalt-react/badge v1.17.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
7 months ago

Badge

Badges are used to inform about status or show a numerical value in proximity to notifications or any action that has been taken.

There are 2 types of badges

  1. Strong
  2. Light

Use a strong badge to denote quantity, use a light badge to seek mild attention. Both types offer different support variants namely danger, warning, info and success which are available as props.

Badge renders danger variation by default for both Strong and Light badges.

Usage

import Badge from "@asphalt-react/badge"

// Strong badge
<Badge value={29} />

// Light badge
<Badge />

Props

value

Numeric value displayed in badge.

typerequireddefault
unionfalsenull

danger

Applies danger styles

typerequireddefault
boolfalsefalse

warning

Applies warning styles

typerequireddefault
boolfalsefalse

info

Applies info styles

typerequireddefault
boolfalsefalse

success

Applies success styles

typerequireddefault
boolfalsefalse