mbr/elm-extras/3.0.0

NOTE: the latest version is 3.1.0

Extras.Svg.Attributes

Conditional rendering helpers for Svg.Attribute.

The names follow the corresponding functions in Html.Attributes.Extra.

empty : Attribute msg

Empty SVG attribute.

attributeIf : Bool -> Attribute msg -> Attribute msg

Render an SVG attribute when the condition is true.

attributeIf isActive (class "active")
attributeMaybe : (a -> Attribute msg) -> Maybe a -> Attribute msg

Render a present value as an SVG attribute.

attributeMaybe id selectedId