lenards/elm-ui-patternfly/1.0.1

NOTE: the latest version is 4.0.2

PF4.Badge

An element for showing off numbers in various scenarios

The PF4.Badge comes in handy when rendering notifications or alerts that have been "read" or "unread" in the form of a "pill" element since in other design systems.

Definition

type Badge

Opaque Badge element

Constructor functions

badge : Int -> Badge

Constructs a Badge

Default status of the Badge will be Read.

Configures the Badge to have an Unread status

Configuration functions

type Status

Defines Status to be one of two values: Read or Unread

Configures Badge to have a Read status

Configures Badge to have a Unread status

Checking value

isRead : Badge -> Bool

Indicates if the status of the Badge is Read

isUnread : Badge -> Bool

Indicates if the status of the Badge is Unread

Rendering stateless element

toMarkup : Badge -> Element msg

Given the custom type representation, renders as an Element msg.