Creates a button with a Primary visual weight and a default size.
Allows to create a Button using predefined Html syntax.
Represents the visual weight of the button.
Represents the color scheme used to render the button.
Creates a button with a Primary visual weight and a default size.
--
import Prima.Pyxis.Button as Button
type Msg =
Clicked
...
myBtn : Button.Config Msg
myBtn =
Button.callOut Button.brand "Click me!" Clicked isDisabledCreates a button with a CallOut visual weight and a small size.
Creates a button with a Primary visual weight and a default size.
Creates a button with a Primary visual weight and a small size.
Creates a button with a Secondary visual weight and a default size.
Creates a button with a Secondary visual weight and a small size.
Creates a button with a Tertiary visual weight and a default size.
Creates a button with a Tertiary visual weight and a small size.
Renders the button by receiving it's configuration.
--
import Prima.Pyxis.Button as Button
type Msg =
Clicked
...
myBtn : Button.Config Msg
myBtn =
Button.callOut Button.Brand "Click me!" Clicked isDisabled
...
view : Html Msg
view =
let
isEnabled =
True
in
Button.render isEnabled myBtnCreates a button wrapper which can hold a set of Buttons.
--
import Prima.Pyxis.Button as Button
type Msg =
Clicked
...
ctaBtn : Button.Config Msg
ctaBtn =
Button.callOut Button.brand "Click me!" Clicked isDisabled
primaryBtn : Button.Config Msg
primaryBtn =
Button.primary Button.brand "Click me!" Clicked isDisabled
...
view : Html Msg
view =
let
isCtaBtnEnabled =
True
isPrimaryBtnEnabled =
True
in
Button.group [(isCtaBtnEnabled, ctaBtn), (isPrimaryBtnEnabled, primaryBtn)]
Represents the configuration of the button.