Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Latest commit

 

History

History
27 lines (20 loc) · 728 Bytes

text_badge.md

File metadata and controls

27 lines (20 loc) · 728 Bytes

Badges/TextBadge

Renders any text as a badge.

TextBadge example

<div>
    <TextBadge>Default</TextBadge>
    <TextBadge type="success">Success</TextBadge>
    <TextBadge type="info">Info</TextBadge>
    <TextBadge type="warning">Warning</TextBadge>
    <TextBadge type="danger">Danger</TextBadge>
</div>

Props

type={string}
The type of alert to display. One of "default", "success", "info", "warning", or "danger".

CSS

Adds dp-badge to the root element.

Adds dp-badge--${type} to the root element, where ${type} matches the type prop value.

Adds dp-bg--${type} to the root element, where ${type} matches the type prop value.