Represent the configuration of the buttonGroup.
create : List (Prima.Pyxis.Button.Config msg) -> Config msg
Create a button group.
--
import Prima.Pyxis.ButtonGroup as ButtonGroup
myBtnGroup : ButtonGroup.Config Msg
myBtnGroup =
ButtonGroup.configure myButtons
render : Config msg -> Html msg
Create a button wrapper which can hold a set of Button
s.
--
import Prima.Pyxis.Button as Button
import Prima.Pyxis.ButtonGroup as Group
type Msg =
Clicked
...
ctaBtn : Button.Config Msg
ctaBtn =
Button.callOut "Click me!"
|> Button.withOnClick Clicked
|> Button.withDisabled True
primaryBtn : Button.Config Msg
primaryBtn =
Button.primary "Click me!"
|> Button.withOnClick Clicked
...
buttonGroup : ButtonGroup.Config Msg
buttonGroup =
ButtonGroup.centered [ctaBtn, primaryBtn]
|> ButtonGroup.withId "group-1"
...
view : Html Msg
view =
ButtonGroup.render buttonGroup
withAttribute : Html.Attribute msg -> Config msg -> Config msg
Adds a generic attribute to the ButtonGroup
.
withAlignmentCentered : Config msg -> Config msg
Adds an alignment class to the ButtonGroup
.
withAlignmentContentEnd : Config msg -> Config msg
Adds an alignment class to the ButtonGroup
.
withAlignmentContentStart : Config msg -> Config msg
Adds an alignment class to the ButtonGroup
.
withAlignmentCoverFluid : Config msg -> Config msg
Adds an alignment class to the ButtonGroup
.
withAlignmentSpaceAround : Config msg -> Config msg
Adds an alignment class to the ButtonGroup
.
withAlignmentSpaceBetween : Config msg -> Config msg
Adds an alignment class to the ButtonGroup
.
withAlignmentSpaceEvenly : Config msg -> Config msg
Adds an alignment class to the ButtonGroup
.
withClass : String -> Config msg -> Config msg
Adds a class to the ButtonGroup
.
withId : String -> Config msg -> Config msg
Adds an id
Html.Attribute to the ButtonGroup
.