mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-24 17:02:51 +03:00
Make the pennant required
This commit is contained in:
parent
7723c5d63f
commit
f4dff90f06
@ -36,7 +36,7 @@ view :
|
||||
, selected : Checkbox.IsSelected
|
||||
, disabled : Bool
|
||||
, isLocked : Bool
|
||||
, pennant : Maybe Pennant
|
||||
, pennant : Pennant
|
||||
, onChange : Bool -> msg
|
||||
, onLockedClick : msg
|
||||
}
|
||||
@ -67,14 +67,11 @@ view config =
|
||||
Checkbox.Square
|
||||
}
|
||||
, case config.pennant of
|
||||
Just Premium ->
|
||||
Premium ->
|
||||
premiumFlag
|
||||
|
||||
Just PremiumWithWriting ->
|
||||
PremiumWithWriting ->
|
||||
premiumWithWritingFlag
|
||||
|
||||
Nothing ->
|
||||
Html.text ""
|
||||
]
|
||||
|
||||
|
||||
|
@ -79,7 +79,7 @@ update msg state =
|
||||
type alias PremiumExampleConfig =
|
||||
{ disabled : Bool
|
||||
, teacherPremiumLevel : PremiumLevel
|
||||
, pennant : Maybe PremiumCheckbox.Pennant
|
||||
, pennant : PremiumCheckbox.Pennant
|
||||
}
|
||||
|
||||
|
||||
@ -175,7 +175,7 @@ viewPremiumCheckboxes : State -> Html Msg
|
||||
viewPremiumCheckboxes state =
|
||||
let
|
||||
checkbox config =
|
||||
PremiumCheckbox.premium
|
||||
PremiumCheckbox.view
|
||||
{ label = config.label
|
||||
, id = "premium-checkbox-" ++ config.label
|
||||
, selected =
|
||||
@ -192,10 +192,24 @@ viewPremiumCheckboxes state =
|
||||
}
|
||||
in
|
||||
Html.div []
|
||||
[ checkbox { label = "Identify Adjectives 1 (Free)", disabled = False, isLocked = False, pennant = Nothing }
|
||||
, checkbox { label = "Identify Adjectives 2 (Premium)", disabled = False, isLocked = False, pennant = Just PremiumCheckbox.Premium }
|
||||
, checkbox { label = "Revising Wordy Phrases 1 (Writing)", disabled = False, isLocked = True, pennant = Just PremiumCheckbox.PremiumWithWriting }
|
||||
, checkbox { label = "Revising Wordy Phrases 2 (Writing) (Disabled)", disabled = True, isLocked = True, pennant = Just PremiumCheckbox.PremiumWithWriting }
|
||||
[ checkbox
|
||||
{ label = "Identify Adjectives 2 (Premium)"
|
||||
, disabled = False
|
||||
, isLocked = False
|
||||
, pennant = PremiumCheckbox.Premium
|
||||
}
|
||||
, checkbox
|
||||
{ label = "Revising Wordy Phrases 1 (Writing)"
|
||||
, disabled = False
|
||||
, isLocked = True
|
||||
, pennant = PremiumCheckbox.PremiumWithWriting
|
||||
}
|
||||
, checkbox
|
||||
{ label = "Revising Wordy Phrases 2 (Writing) (Disabled)"
|
||||
, disabled = True
|
||||
, isLocked = True
|
||||
, pennant = PremiumCheckbox.PremiumWithWriting
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user