From 178122123a63deca741bc5ba5a15fb04e8f66ce0 Mon Sep 17 00:00:00 2001 From: Kamil Date: Sun, 28 Jul 2024 20:30:13 +0200 Subject: [PATCH] fix: fixed issue with textinput styling after new release (#4466) * fix: fixed issue with textinput styling after new release * fix: updated snapshots --- src/components/TextInput/TextInputFlat.tsx | 4 +-- .../TextInput/TextInputOutlined.tsx | 4 +-- .../__snapshots__/TextInput.test.tsx.snap | 36 +++++++++---------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/components/TextInput/TextInputFlat.tsx b/src/components/TextInput/TextInputFlat.tsx index f2bc202470..8a0dcb1e0e 100644 --- a/src/components/TextInput/TextInputFlat.tsx +++ b/src/components/TextInput/TextInputFlat.tsx @@ -443,11 +443,11 @@ const styles = StyleSheet.create({ labelContainer: { paddingTop: 0, paddingBottom: 0, - flex: 1, + flexGrow: 1, }, input: { margin: 0, - flex: 1, + flexGrow: 1, }, inputFlat: { paddingTop: 24, diff --git a/src/components/TextInput/TextInputOutlined.tsx b/src/components/TextInput/TextInputOutlined.tsx index a65cc1cbfc..7f1fe926e8 100644 --- a/src/components/TextInput/TextInputOutlined.tsx +++ b/src/components/TextInput/TextInputOutlined.tsx @@ -429,11 +429,11 @@ export default TextInputOutlined; const styles = StyleSheet.create({ labelContainer: { paddingBottom: 0, - flex: 1, + flexGrow: 1, }, input: { margin: 0, - flex: 1, + flexGrow: 1, }, inputOutlined: { paddingTop: 8, diff --git a/src/components/__tests__/__snapshots__/TextInput.test.tsx.snap b/src/components/__tests__/__snapshots__/TextInput.test.tsx.snap index 594224cdd0..2c127e0ba8 100644 --- a/src/components/__tests__/__snapshots__/TextInput.test.tsx.snap +++ b/src/components/__tests__/__snapshots__/TextInput.test.tsx.snap @@ -38,7 +38,7 @@ exports[`call onPress when affix adornment pressed 1`] = ` style={ [ { - "flex": 1, + "flexGrow": 1, "paddingBottom": 0, "paddingTop": 0, }, @@ -187,7 +187,7 @@ exports[`call onPress when affix adornment pressed 1`] = ` style={ [ { - "flex": 1, + "flexGrow": 1, "margin": 0, }, {}, @@ -337,7 +337,7 @@ exports[`correctly applies a component as the text label 1`] = ` style={ [ { - "flex": 1, + "flexGrow": 1, "paddingBottom": 0, "paddingTop": 0, }, @@ -503,7 +503,7 @@ exports[`correctly applies a component as the text label 1`] = ` style={ [ { - "flex": 1, + "flexGrow": 1, "margin": 0, }, {}, @@ -577,7 +577,7 @@ exports[`correctly applies cursorColor prop 1`] = ` style={ [ { - "flex": 1, + "flexGrow": 1, "paddingBottom": 0, "paddingTop": 0, }, @@ -727,7 +727,7 @@ exports[`correctly applies cursorColor prop 1`] = ` style={ [ { - "flex": 1, + "flexGrow": 1, "margin": 0, }, {}, @@ -801,7 +801,7 @@ exports[`correctly applies default textAlign based on default RTL 1`] = ` style={ [ { - "flex": 1, + "flexGrow": 1, "paddingBottom": 0, "paddingTop": 0, }, @@ -951,7 +951,7 @@ exports[`correctly applies default textAlign based on default RTL 1`] = ` style={ [ { - "flex": 1, + "flexGrow": 1, "margin": 0, }, {}, @@ -1018,7 +1018,7 @@ exports[`correctly applies height to multiline Outline TextInput 1`] = ` style={ [ { - "flex": 1, + "flexGrow": 1, "paddingBottom": 0, }, { @@ -1207,7 +1207,7 @@ exports[`correctly applies height to multiline Outline TextInput 1`] = ` style={ [ { - "flex": 1, + "flexGrow": 1, "margin": 0, }, { @@ -1282,7 +1282,7 @@ exports[`correctly applies paddingLeft from contentStyleProp 1`] = ` style={ [ { - "flex": 1, + "flexGrow": 1, "paddingBottom": 0, "paddingTop": 0, }, @@ -1432,7 +1432,7 @@ exports[`correctly applies paddingLeft from contentStyleProp 1`] = ` style={ [ { - "flex": 1, + "flexGrow": 1, "margin": 0, }, {}, @@ -1508,7 +1508,7 @@ exports[`correctly applies textAlign center 1`] = ` style={ [ { - "flex": 1, + "flexGrow": 1, "paddingBottom": 0, "paddingTop": 0, }, @@ -1658,7 +1658,7 @@ exports[`correctly applies textAlign center 1`] = ` style={ [ { - "flex": 1, + "flexGrow": 1, "margin": 0, }, {}, @@ -1732,7 +1732,7 @@ exports[`correctly renders left-side affix adornment, and right-side icon adornm style={ [ { - "flex": 1, + "flexGrow": 1, "paddingBottom": 0, "paddingTop": 0, }, @@ -1882,7 +1882,7 @@ exports[`correctly renders left-side affix adornment, and right-side icon adornm style={ [ { - "flex": 1, + "flexGrow": 1, "margin": 0, }, {}, @@ -2158,7 +2158,7 @@ exports[`correctly renders left-side icon adornment, and right-side affix adornm style={ [ { - "flex": 1, + "flexGrow": 1, "paddingBottom": 0, "paddingTop": 0, }, @@ -2308,7 +2308,7 @@ exports[`correctly renders left-side icon adornment, and right-side affix adornm style={ [ { - "flex": 1, + "flexGrow": 1, "margin": 0, }, {},