Add back min height for writing text areas

This commit is contained in:
Jasper Woudenberg 2018-05-30 10:56:03 -07:00
parent a56dc32d10
commit b170638ec6
2 changed files with 17 additions and 4 deletions

View File

@ -1,4 +1,4 @@
module Nri.Ui.InputStyles exposing (Assets, CssClasses(..), inputLineHeight, inputPaddingVertical, styles, textAreaHeight, writingLineHeight, writingPadding, writingPaddingTop)
module Nri.Ui.InputStyles exposing (Assets, CssClasses(..), inputLineHeight, inputPaddingVertical, styles, textAreaHeight, writingLineHeight, writingMinHeight, writingPadding, writingPaddingTop)
{-|
@ -7,7 +7,7 @@ module Nri.Ui.InputStyles exposing (Assets, CssClasses(..), inputLineHeight, inp
## Shared hardcoded values
@docs inputPaddingVertical, inputLineHeight, textAreaHeight, writingLineHeight, writingPadding, writingPaddingTop
@docs inputPaddingVertical, inputLineHeight, textAreaHeight, writingLineHeight, writingPadding, writingPaddingTop, writingMinHeight
-}
@ -146,7 +146,7 @@ styles =
, borderColor azure
]
, selector "textarea"
[ minHeight (px 150)
[ minHeight writingMinHeight
]
, selector "input"
[ textAlign center
@ -288,3 +288,8 @@ writingPadding =
writingPaddingTop : Px
writingPaddingTop =
px 20
writingMinHeight : Px
writingMinHeight =
px 150

View File

@ -211,7 +211,15 @@ calculateMinHeight textAreaStyle specifiedHeight =
singleLineHeight
DefaultHeight ->
InputStyles.textAreaHeight
case textAreaStyle of
DefaultStyle ->
InputStyles.textAreaHeight
WritingStyle ->
InputStyles.writingMinHeight
ContentCreationStyle ->
InputStyles.textAreaHeight
singleLineHeight : Css.Px