BadgePrimitive

BadgePrimitive

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

Props

NameTypeDefaultDescription
classNameOptional className of the component to allow adding classes that apply styles to text, border and background colors
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 IATA 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