BadgePrimitive

BadgePrimitive

import BadgePrimitive from "@kiwicom/orbit-components/lib/primitives/BadgePrimitive";
<BadgePrimitive>Hello!</BadgePrimitive>

Props

NameTypeDefaultDescription
backgroundstringBackground of a BadgePrimitive. Can use gradients and images
foregroundColorstringForeground color, controling color of a text and icon.
childrenReact.NodeThe content of the BadgePrimitive.
dataTeststringOptional prop for testing purposes.
idstringSet id for BadgePrimitive
iconReact.NodeThe displayed icon on the left.
ariaLabelstringAdds prop adds aria-label to an element, useful for screenreaders.
carriersCarrier[]The content of the CarrierLogo, passed as array of objects.

Carrier

NameTypeDescription
codestringThe code of the Carrier, defines which logo will be rendered.
namestringThe name of the Carrier, mainly for information.
typeenumThe preferred placeholder for non-existing carrier. See Functional specs