{ config | blankChar : Char
, blankName : String
, class : String
}
Configuration for card view
blankChar
: character used to render empty text in the card.blankName
: text used as placeholder for when the name is empty.{ blankChar : Char
, blankName : String
, class : String
, onChange : CreditCard.Internal.CardData model -> msg
, showLabel : Basics.Bool
, classes : Form
, labels : Form
, placeholders : Form
, autocomplete : Basics.Bool
}
Configuration for form view.
This includes all configuration from Config
with addition of:
onChange
: Msg
function for updating CardData
showLabel
: hide/show the label of each form field.classes
: classes of each form field's container, stored in a Form
record.labels
: text of each form field's label, stored in a Form
record.placeholders
: the placeholder text of form field, stored in a Form
record.yearConfig
: the config for year input. see YearConfig
.{ number : String
, name : String
, month : String
, year : String
, cvv : String
}
For all form related configuration (e.g.: classes, labels, etc)
defaultConfig : Config {}
Default configuration for card view
blankChar = '•'
blankName = 'YOUR NAME'
defaultFormConfig : (CreditCard.Internal.CardData model -> msg) -> FormConfig model msg
Default configuration for form view
Requires a Msg
function to update the CardData
showLabel = True
classes =
See defaultClasses
labels =
See defaultLabels
placeholders =
See defaultPlaceholders
defaultClasses : Form
Default classes name for form view
number = "Number"
name = "Name"
month = "Month"
year = "Year"
cvv = "CVV"
defaultLabels : Form
Default label for form view
number = "Number"
name = "Full Name"
month = "Month"
year = "Year"
cvv = "CVV"
defaultPlaceholders : Form
Default placeholder text for form view
number = "Credit Card Number"
name = "First Last"
month = "MM"
year = "YY"
cvv = "CVV"