abadi199 / elm-input-extra

🔢 Commonly used Html element with extra functionality
http://package.elm-lang.org/packages/abadi199/elm-input-extra/latest
MIT License
51 stars 12 forks source link

Input Placeholder #4

Closed Bernardoow closed 3 years ago

Bernardoow commented 7 years ago

Hi, Abadin199 !

At input masked, I added placeholder.

It's a cool idea? If it's I can do in more places.

5

abadi199 commented 7 years ago

Hi Bernando, Thanks for your contribution. It's a neat idea, but I believe you can also do this by adding placeholder as part of the attributes argument of the input functions. Example:

MaskedInput.Text.input 
    MaskedInput.Text.defaultOptions 
    [ Html.placeholder "some placeholder text" ]
    model.currentState
    model.currentValue

Unless there's a reason you can't do that? I'm trying to keep the number of options you need to configure to a minimum.