From c7bedca6452e2658f48f59f8c9c02dbc4ed1bc41 Mon Sep 17 00:00:00 2001 From: Luke Walczak Date: Fri, 10 Dec 2021 10:15:15 +0100 Subject: [PATCH] fix: correct long label in outlined text input (#2960) --- example/src/Examples/TextInputExample.tsx | 10 ++++++++++ example/utils/index.ts | 1 + src/components/TextInput/Label/LabelBackground.tsx | 5 ++++- .../__tests__/__snapshots__/TextInput.test.js.snap | 3 ++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/example/src/Examples/TextInputExample.tsx b/example/src/Examples/TextInputExample.tsx index 193cd4477a..de05e0e640 100644 --- a/example/src/Examples/TextInputExample.tsx +++ b/example/src/Examples/TextInputExample.tsx @@ -28,6 +28,7 @@ const initialState: State = { outlinedMultiline: '', outlinedTextArea: '', outlinedColors: '', + outlinedLongLabel: '', maxLengthName: '', flatTextSecureEntry: true, outlineTextSecureEntry: true, @@ -391,6 +392,15 @@ const TextInputExample = () => { outlineColor={pink400} activeOutlineColor={amber900} /> + + inputActionHandler('outlinedLongLabel', outlinedLongLabel) + } + /> @@ -264,6 +264,7 @@ exports[`correctly applies height to multiline Outline TextInput 1`] = ` "fontSize": 16, "fontWeight": undefined, "left": 18, + "maxWidth": -28, "opacity": 1, "paddingHorizontal": 0, "position": "absolute",