rakutentech / r10 / R10.Button

Buttons!

Buttons

primary : List (Element.WithContext.Attribute (R10.Context.ContextInternal z) msg) -> { label : Element.WithContext.Element (R10.Context.ContextInternal z) msg, libu : R10.Libu.Type msg, translation : { a | key : String } } -> Element.WithContext.Element (R10.Context.ContextInternal z) 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
        }
    }

secondary : List (Element.WithContext.Attribute (R10.Context.ContextInternal z) msg) -> { label : Element.WithContext.Element (R10.Context.ContextInternal z) msg, libu : R10.Libu.Type msg, translation : { a | key : String } } -> Element.WithContext.Element (R10.Context.ContextInternal z) msg

Secondary Button

tertiary : List (Element.WithContext.Attribute (R10.Context.ContextInternal z) msg) -> { label : Element.WithContext.Element (R10.Context.ContextInternal z) msg, libu : R10.Libu.Type msg, translation : { a | key : String } } -> Element.WithContext.Element (R10.Context.ContextInternal z) msg

Tertiary Button

quaternary : List (Element.WithContext.Attribute (R10.Context.ContextInternal z) msg) -> { label : Element.WithContext.Element (R10.Context.ContextInternal z) msg, libu : R10.Libu.Type msg, translation : { a | key : String } } -> Element.WithContext.Element (R10.Context.ContextInternal z) msg

Quaternary Button

Others


type alias Data z msg =
{ label : Element.WithContext.Element (R10.Context.ContextInternal z) msg
, libu : R10.Libu.Type msg 
}

Type of data required by buttons

cssButtonStyle : R10.Theme.Theme -> String

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

numberPadding : Basics.Int

Default padding value for buttons

withLimitedWidth : List (Element.WithContext.Attribute (R10.Context.ContextInternal z) msg)

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

withId : String -> Element.WithContext.Element (R10.Context.ContextInternal z) msg -> Element.WithContext.Element (R10.Context.ContextInternal z) msg