arowM/elm-mixin/4.1.0

NOTE: the latest version is 5.3.0

Mixin

A brief module for Mixins.

Core

type Mixin msg

Similar to Html.Attribute msg but more flexible and reusable.

fromAttributes : List (Attribute msg) -> Mixin msg
toAttributes : Mixin msg -> List (Attribute msg)
batch : List (Mixin msg) -> Mixin msg
none : Mixin msg

Attributes

fromAttribute : Attribute msg -> Mixin msg

Common attributes

attribute : String -> String -> Mixin msg
class : String -> Mixin msg
id : String -> Mixin msg

Conditional functions

when : Bool -> Mixin msg -> Mixin msg

Insert a Mixin only when conditions are met.

unless : Bool -> Mixin msg -> Mixin msg

Insert a Mixin unless conditions are met.

Lower level functions

map : (a -> b) -> Mixin a -> Mixin b