NoRedInk / noredink-ui / Nri.Ui.PremiumCheckbox.V8

Patch changes:

Changes from V7:

view : { label : String, onChange : Basics.Bool -> msg } -> List (Attribute msg) -> Accessibility.Styled.Html msg

selected : Basics.Bool -> Attribute msg

partiallySelected : Attribute msg

Content

premium : Nri.Ui.Data.PremiumDisplay.PremiumDisplay -> Attribute msg

Lock Premium content if the user does not have Premium.

onLockedClick : msg -> Attribute msg

Show Premium pennant on Premium content.

When a locked premium checkbox is clicked, the msg that's passed in will fire.

Attributes


type Attribute msg

Customizations for the RadioButton.

disabled : Attribute msg

This disables the input

enabled : Attribute msg

This enables the input, this is the default behavior

id : String -> Attribute msg

Set a custom ID for this checkbox and label. If you don't set this, we'll automatically generate one from the label you pass in, but this can cause problems if you have more than one checkbox with the same label on the page. Use this to be more specific and avoid issues with duplicate IDs!

Custom CSS

setCheckboxContainerCss : List Css.Style -> Attribute msg

Set custom CSS for the checkbox container

setCheckboxEnabledLabelCss : List Css.Style -> Attribute msg

Set custom CSS for the enabled checkbox label

setCheckboxDisabledLabelCss : List Css.Style -> Attribute msg

Set custom CSS for the disabled checkbox label

noMargin : Basics.Bool -> Attribute value

Remove default spacing from the top and bottom of the checkbox.