NoRedInk/noredink-ui/21.8.0

NOTE: the latest version is 35.9.3

Nri.Ui.QuestionBox.V1

view : List (Attribute msg) -> Html msg
QuestionBox.view
    [ QuestionBox.markdown "**WOW**, great component!"
    ]
type Attribute msg
id : String -> Attribute msg
markdown : String -> Attribute msg
List
{ label : String
, onClick : msg
}
-> Attribute msg
Maybe
{ name : String
, icon : Svg
}
-> Attribute msg

This is the default type of question box. It doesn't have a programmatic or direct visual relationship to any piece of content.

pointingTo : List (Html msg) -> Attribute msg

This type of QuestionBox has an arrow pointing to the relevant part of the question.

Typically, you would use this type of QuestionBox type with a Block.

This type of QuestionBox is only rendered after measurements of the DOM are made.

Tessa does not know when it's appropriate to use this type of QuestionBox -- sorry!

containerCss : List Style -> Attribute msg

Anchored box measurements

Initially, the anchored box will be rendered in the "Measuring" state.

While in the Measuring state, the anchored box will have visibility hidden. This will cause the box to take up vertical space but not show to the user until measurements have been taken.t

Decodes JSON in the format:

{
    "anchors" = [ { "x" = 1.2, "y" = .3, "width" = 300.0, "height" = 325.5 } ],
    "container" = { "x" = 1.2, "y" = .3, "width" = 300.0, "height" = 325.5 },
    "box" = { "x" = 1.2, "y" = .3, "width" = 300.0, "height" = 325.5 }
}

Produces an AnchoredBoxMeasurement for use with anchoredTo