bpk-component-badge
v6.0.1
Published
Backpack badge component.
Downloads
183
Keywords
Readme
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, BADGE_TYPES.strong)| false | BADGE_TYPES.warning |
Theme props
badgeBackgroundColor
badgeSuccessBackgroundColor
badgeDestructiveBackgroundColor