primait / pyxis-components / 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.

right : List (Html msg) -> Config msg

Create a tooltip right.

brand : List (Html msg) -> Config msg

Create a tooltip brand.

error : List (Html msg) -> Config msg

Create a tooltip error.

warning : List (Html msg) -> Config msg

Create a tooltip warning.

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 =
        Tooltip.brand [ text "Lorem ipsum dolor sit amet" ]
          |> Tooltip.render

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.

withPositionBottom : Config msg -> Config msg

Sets a type position Bottom to the Tooltip.

withPositionLeft : Config msg -> Config msg

Sets a type position Left to the Tooltip.

withPositionRight : Config msg -> Config msg

Sets a type position Right to the Tooltip.

withPositionTop : Config msg -> Config msg

Sets a type position Top to the Tooltip.