NoRedInk/noredink-ui/6.9.0

NOTE: the latest version is 35.9.3

Nri.Ui.PremiumCheckbox.V2

type alias PremiumConfig msg =
{ label : String
, id : String
, selected : IsSelected
, disabled : Bool
, isLocked : Bool
, pennant : Maybe Pennant
, onChange : Bool -> msg
, onLockedClick : msg
, noOpMsg : msg
}
  • onChange: A message for when the user toggles the checkbox
  • onLockedClick: A message for when the user clicks a checkbox they don't have PremiumLevel for. If you get this message, you should show an Nri.Ui.Premium.Model.view
premium : Assets a -> PremiumConfig msg -> Html msg

A checkbox that should be used for premium content

type Pennant
= Premium
| PremiumWithWriting

Premium is the yellow "P" pennant PremiumWithWriting is the yellow "P+" pennant