primait/pyxis-components/7.0.0

NOTE: the latest version is 9.0.3

Prima.Pyxis.Tooltip

Configuration

type Config msg

Represent the opaque Tooltip configuration.

Configuration Methods

top : List (Html msg) -> Config msg

Create a tooltip top.

bottom : List (Html msg) -> Config msg

Create a tooltip bottom.

left : List (Html msg) -> Config msg

Create a tooltip left.

Rendering

render : Config msg -> Html msg

Renders the Tooltip.

import Html
import Prima.Pyxis.Tooltip as Tooltip


...


type Msg =
    NoOp


type alias Model =
    {}


...


view : Html Msg
view =
    Html.div
        []
        (Tooltip.topConfig []
        |> Tooltip.withClass ""
        )


validate : String -> Validation.Type
validate str =
    if String.isEmpty str then
        Just <| Validation.ErrorWithMessage "Username is empty".
    else
        Nothing

Options

withClass : String -> Config msg -> Config msg

Adds a class to the Tooltip.

withId : String -> Config msg -> Config msg

Adds an id Html.Attribute to the Tooltip.