diff --git a/src/Nri/Ui/InputStyles.elm b/src/Nri/Ui/InputStyles.elm index 1a83bc9c..eb5f2f65 100644 --- a/src/Nri/Ui/InputStyles.elm +++ b/src/Nri/Ui/InputStyles.elm @@ -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 diff --git a/src/Nri/Ui/TextArea/V2.elm b/src/Nri/Ui/TextArea/V2.elm index dac44c5d..b562b819 100644 --- a/src/Nri/Ui/TextArea/V2.elm +++ b/src/Nri/Ui/TextArea/V2.elm @@ -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