From 209fb49b606206556f257bf02472b4a983f24d81 Mon Sep 17 00:00:00 2001 From: Osipov Vladimir Date: Sat, 29 Dec 2018 11:41:35 +0300 Subject: [PATCH] feat(TextArea): stretch modifier --- src/components/TextArea/TextArea.js | 7 +++++++ src/components/TextAreaField/TextAreaField.js | 1 + 2 files changed, 8 insertions(+) diff --git a/src/components/TextArea/TextArea.js b/src/components/TextArea/TextArea.js index 73412fe7..98e07bdf 100644 --- a/src/components/TextArea/TextArea.js +++ b/src/components/TextArea/TextArea.js @@ -11,6 +11,7 @@ type TextAreaProps = {| placeholder?: string, rows?: number, value?: string, + stretch?: boolean, |}; const name = 'textArea'; @@ -29,6 +30,12 @@ const theme = createComponentTheme(name, ({ COLORS, SIZES }: *) => ({ color: COLORS.PLACEHOLDER_COLOR, }, }, + modifiers: { + stretch: { + height: '100%', + width: '100%', + }, + }, })); const StyledTag = createStyledTag(name, { diff --git a/src/components/TextAreaField/TextAreaField.js b/src/components/TextAreaField/TextAreaField.js index ab04d836..ebfdfe2e 100644 --- a/src/components/TextAreaField/TextAreaField.js +++ b/src/components/TextAreaField/TextAreaField.js @@ -52,6 +52,7 @@ function TextAreaField({ value={ value } cols={ cols } rows={ rows } + stretch={ stretch } /> );