Skip to content

Latest commit

 

History

History
 
 

bpk-component-badge

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

bpk-component-badge

Backpack badge component.

Installation

npm install bpk-component-badge --save-dev

Usage

import React from 'react';
import BpkBadge, { BADGE_TYPES } from 'bpk-component-badge';

export default () => (
  <BpkBadge
    type={BADGE_TYPES.warning}
  >
    My Badge
  </BpkBadge>
);

Props

Property PropType Required Default Value
centered bool false null
className string false null
docked oneOf('left', 'right') false null
type oneOf(BADGE_TYPES.warning, BADGE_TYPES.success, BADGE_TYPES.destructive, BADGE_TYPES.light, BADGE_TYPES.inverse, BADGE_TYPES.outline) false BADGE_TYPES.warning

Theme props

  • badgeBackgroundColor
  • badgeSuccessBackgroundColor
  • badgeDestructiveBackgroundColor