lenards/elm-ui-patternfly/3.0.0

NOTE: the latest version is 4.0.2

PF6.Icon

PF6 Icon component

A wrapper for inline SVG or text-based icons with semantic color status support.

See: https://www.patternfly.org/components/icon

Definition

type Icon msg

Opaque Icon type

type Size

Icon display size

type Status

Icon semantic status (controls color)

Constructor

icon : Element msg -> Icon msg

Construct an Icon from any elm-ui Element (SVG, text, etc.)

Size modifiers

withSmallSize : Icon msg -> Icon msg

Small icon

withMediumSize : Icon msg -> Icon msg

Medium icon (default)

withLargeSize : Icon msg -> Icon msg

Large icon

withXLargeSize : Icon msg -> Icon msg

XLarge icon

Status modifiers

Default (text) color

Success (green) color

Danger (red) color

Warning (yellow) color

withInfoStatus : Icon msg -> Icon msg

Info (purple) color

Accessibility modifiers

withAriaLabel : String -> Icon msg -> Icon msg

Set an accessible label (adds aria-label)

withAriaHidden : Icon msg -> Icon msg

Hide from screen readers (aria-hidden)

Rendering

toMarkup : Icon msg -> Element msg

Render the Icon as an Element msg