NoRedInk/noredink-ui/7.2.0

NOTE: the latest version is 35.9.3

Nri.Ui.Callout.V1

type Attribute msg

Attributes of callouts. Use functions like label and containerCss to construct these.

callout : List (Attribute msg) -> List (Html msg) -> Html msg

Render a callout. Use this like any other HTML node, but with specific attribute constructors.

callout
    [ label (Html.text "BETA") ]
    [ Html.text "This feature is still in beta. Careful of sharp edges." ]
label : Html msg -> Attribute msg

Label the callout.

label (Html.text "Hello, World")
containerCss : List Style -> Attribute msg

Customize styles for the outermost element of the callout. Use this to adjust margin and padding around the callout (it does not have any of either by default, but it does set box-size: border-box on itself).

containerCss [ Css.marginBottom (Css.px 20) ]

These styles are applied after the default styles so you can override the defaults when necessary without using !important

contentCss : List Style -> Attribute msg

Customize styles for the parent element of the content you provide. Use this to override spacing inside the callout, if necessary.

contentCss [ Css.textTransform Css.uppercase ]

These styles are applied after the default styles so you can override the defaults when necessary without using !important

custom : Attribute msg -> Attribute msg

Add custom attributes. This is your gateway to customize (or break) the callout however you want, so be careful! If you find yourself doing this a lot, please consider adding another Attribute constructor to the module.

custom (title "beta warning")