Represent the configuration of the DownloadButton
.
download : String -> String -> Config msg
Create a default download button.
render : Config msg -> Html msg
Renders the button by receiving it's configuration.
--
import Prima.Pyxis.DownloadButton as DownloadButtonButton
type Msg =
Clicked
...
myBtn : DownloadButton.Config Msg
myBtn =
DownloadButton.default "Certificato di polizza" "Scarica .pdf"
|> DownloadButton.withDisabled False
|> DownloadButton.withOnClick Clicked
...
view : Html Msg
view =
DownloadButton.render myBtn
withAttribute : Html.Attribute msg -> Config msg -> Config msg
Adds a generic attribute to the Button.
withClass : String -> Config msg -> Config msg
Adds classes to the classes
of the DownloadButton
.
withDisabled : Basics.Bool -> Config msg -> Config msg
Adds a disabled
Html.Attribute to the DownloadButton
.
withId : String -> Config msg -> Config msg
Adds an id
Html.Attribute to the DownloadButton
.
withTabIndex : Basics.Int -> Config msg -> Config msg
Adds a tabIndex
Html.Attribute to the DownloadButton
.
withTargetBlank : Config msg -> Config msg
Adds a target
Html.Attribute to the DownloadButton
.
withTargetParent : Config msg -> Config msg
Adds a target
Html.Attribute to the DownloadButton
.
withTargetSelf : Config msg -> Config msg
Adds a target
Html.Attribute to the DownloadButton
.
withTargetTop : Config msg -> Config msg
Adds a target
Html.Attribute to the DownloadButton
.
withTitle : String -> Config msg -> Config msg
Adds a title
Html.Attribute to the DownloadButton
.
withSvgIcon : Config msg -> Config msg
Tells the DownloadButton
component to use SVG icons instead of Pyxis icons.
withOnClick : msg -> Config msg -> Config msg
Adds an onClick
Html.Event to the DownloadButton
.
withOnMouseDown : msg -> Config msg -> Config msg
Adds an onMouseDown
Html.Event to the DownloadButton
.
withOnMouseUp : msg -> Config msg -> Config msg
Adds an onMouseUp
Html.Event to the DownloadButton
.
withOnMouseEnter : msg -> Config msg -> Config msg
Adds an onMouseEnter
Html.Event to the DownloadButton
.
withOnMouseLeave : msg -> Config msg -> Config msg
Adds an onMouseLeave
Html.Event to the DownloadButton
.
withOnMouseOver : msg -> Config msg -> Config msg
Adds an onMouseOver
Html.Event to the DownloadButton
.
withOnMouseOut : msg -> Config msg -> Config msg
Adds an onMouseOut
Html.Event to the DownloadButton
.