rakutentech/r10/4.0.0

NOTE: the latest version is 7.0.0

R10.Button

Buttons!

Buttons

List (AttributeC msg)
-> { label : ElementC msg
, libu : Type msg
}
-> ElementC msg

Primary Button for Call to Actions

R10.Button.primary []
    { label = text "Text"
    , libu = R10.Libu.Bu <| Just doSomething
    , theme =
        { mode = R10.Mode.Light
        , primaryColor = R10.Color.Primary.CrimsonRed
        }
    }
List (AttributeC msg)
-> { label : ElementC msg
, libu : Type msg
}
-> ElementC msg

Secondary Button

List (AttributeC msg)
-> { label : ElementC msg
, libu : Type msg
}
-> ElementC msg

Tertiary Button

List (AttributeC msg)
-> { label : ElementC msg
, libu : Type msg
}
-> ElementC msg

Quaternary Button

Others

type alias Data msg =
{ label : ElementC msg
, libu : Type msg
}

Type of data required by buttons

cssButtonStyle : Theme -> String

Special case for CSS buttons, useful if a button must be built using the standard Html library instead of elm-ui.

Default padding value for buttons

withLimitedWidth : List (AttributeC msg)

Attributes for buttons with limited width. By default buttons are width fill.

withId : String -> ElementC msg -> ElementC msg