Represent the RadioButtonChoice configuration.
Create a radioButton.
Create the 'RadioButtonChoice' configuration.
Create the 'radioButtonChoiceWithSubtitle' configuration.
Input.import Html
import Prima.Pyxis.Form.RadioButton as RadioButton
import Prima.Pyxis.Form.Validation as Validation
...
type Msg =
OnChange String
type alias Model =
{ tipoPolizza: Maybe String }
...
view : Html Msg
view =
Html.div
[]
(Input.email .tipoPolizza OnInput
|> Input.withClass "my-custom-class"
|> Input.withValidation (Maybe.andThen validate << .tipoPolizza)
)
validate : String -> Validation.Type
validate str =
if String.isEmpty str then
Just <| Validation.ErrorWithMessage "Tipo di polizza is empty".
else
NothingAdds a generic Html.Attribute to the RadioButton.
Adds a class to the RadioButton.
Adds an id Html.Attribute to the RadioButton.
Adds disabled Html.Attribute to the RadioButton.
Attaches the onBlur event to the RadioButton.
Attaches the onFocus event to the RadioButton.
Adds a Validation rule to the RadioButton.
Represent the opaque
RadioButtonconfiguration.