Skip to content

Commit

Permalink
fix(InputField): changed styles for multiline
Browse files Browse the repository at this point in the history
  • Loading branch information
vpsmolina committed Dec 28, 2023
1 parent a9c8e18 commit 221d476
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ exports[`@lad-tech/mobydick-core/ChatInput renders correctly 1`] = `
style={
[
{
"alignItems": "flex-start",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "transparent",
"borderRadius": 12,
Expand Down Expand Up @@ -99,6 +99,7 @@ exports[`@lad-tech/mobydick-core/ChatInput renders correctly 1`] = `
{
"flex": 1,
"padding": 0,
"textAlignVertical": "top",
},
{
"color": "#20242D",
Expand Down Expand Up @@ -231,7 +232,7 @@ exports[`@lad-tech/mobydick-core/ChatInput renders correctly android 1`] = `
style={
[
{
"alignItems": "flex-start",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "transparent",
"borderRadius": 12,
Expand Down Expand Up @@ -276,6 +277,7 @@ exports[`@lad-tech/mobydick-core/ChatInput renders correctly android 1`] = `
{
"flex": 1,
"padding": 0,
"textAlignVertical": "top",
},
[
{
Expand Down Expand Up @@ -413,7 +415,7 @@ exports[`@lad-tech/mobydick-core/ChatInput renders correctly with containerStyle
style={
[
{
"alignItems": "flex-start",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "transparent",
"borderRadius": 12,
Expand Down Expand Up @@ -458,6 +460,7 @@ exports[`@lad-tech/mobydick-core/ChatInput renders correctly with containerStyle
{
"flex": 1,
"padding": 0,
"textAlignVertical": "top",
},
{
"color": "#20242D",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exports[`@lad-tech/mobydick-core/ChatInputField renders correctly 1`] = `
style={
[
{
"alignItems": "flex-start",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "transparent",
"borderRadius": 12,
Expand Down Expand Up @@ -69,6 +69,7 @@ exports[`@lad-tech/mobydick-core/ChatInputField renders correctly 1`] = `
{
"flex": 1,
"padding": 0,
"textAlignVertical": "top",
},
{
"color": "#20242D",
Expand Down Expand Up @@ -115,7 +116,7 @@ exports[`@lad-tech/mobydick-core/ChatInputField renders correctly focused/blur 1
style={
[
{
"alignItems": "flex-start",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "rgba(32, 36, 45, 0.3)",
"borderRadius": 12,
Expand Down Expand Up @@ -160,6 +161,7 @@ exports[`@lad-tech/mobydick-core/ChatInputField renders correctly focused/blur 1
{
"flex": 1,
"padding": 0,
"textAlignVertical": "top",
},
{
"color": "#20242D",
Expand Down Expand Up @@ -205,7 +207,7 @@ exports[`@lad-tech/mobydick-core/ChatInputField renders correctly focused/blur 2
style={
[
{
"alignItems": "flex-start",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "transparent",
"borderRadius": 12,
Expand Down Expand Up @@ -250,6 +252,7 @@ exports[`@lad-tech/mobydick-core/ChatInputField renders correctly focused/blur 2
{
"flex": 1,
"padding": 0,
"textAlignVertical": "top",
},
{
"color": "#20242D",
Expand Down Expand Up @@ -295,7 +298,7 @@ exports[`@lad-tech/mobydick-core/ChatInputField renders correctly with props 1`]
style={
[
{
"alignItems": "flex-start",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "transparent",
"borderRadius": 12,
Expand Down Expand Up @@ -343,6 +346,7 @@ exports[`@lad-tech/mobydick-core/ChatInputField renders correctly with props 1`]
{
"flex": 1,
"padding": 0,
"textAlignVertical": "top",
},
{
"color": "#20242D",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly 1`] = `
{
"flex": 1,
"padding": 0,
"textAlignVertical": undefined,
},
{
"color": "#20242D",
Expand Down Expand Up @@ -179,6 +180,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly disabled 1`] = `
{
"flex": 1,
"padding": 0,
"textAlignVertical": undefined,
},
{
"color": "#20242D",
Expand Down Expand Up @@ -244,6 +246,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly disabled 2`] = `
{
"flex": 1,
"padding": 0,
"textAlignVertical": undefined,
},
{
"color": "#20242D",
Expand Down Expand Up @@ -309,6 +312,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly focused/blur 1`] =
{
"flex": 1,
"padding": 0,
"textAlignVertical": undefined,
},
{
"color": "#20242D",
Expand Down Expand Up @@ -374,6 +378,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly focused/blur 2`] =
{
"flex": 1,
"padding": 0,
"textAlignVertical": undefined,
},
{
"color": "#20242D",
Expand Down Expand Up @@ -464,6 +469,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly multiline = false
{
"flex": 1,
"padding": 0,
"textAlignVertical": undefined,
},
[
{
Expand Down Expand Up @@ -521,7 +527,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly multiline = true 1
style={
[
{
"alignItems": "flex-start",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "transparent",
"borderRadius": 12,
Expand Down Expand Up @@ -554,6 +560,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly multiline = true 1
{
"flex": 1,
"padding": 0,
"textAlignVertical": "top",
},
[
{
Expand Down Expand Up @@ -645,6 +652,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly secureTextEntry 1`
{
"flex": 1,
"padding": 0,
"textAlignVertical": undefined,
},
[
{
Expand Down Expand Up @@ -751,6 +759,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly valid 1`] = `
{
"flex": 1,
"padding": 0,
"textAlignVertical": undefined,
},
{
"color": "#20242D",
Expand Down Expand Up @@ -816,6 +825,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly valid 2`] = `
{
"flex": 1,
"padding": 0,
"textAlignVertical": undefined,
},
{
"color": "#20242D",
Expand Down Expand Up @@ -881,6 +891,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly wrong 1`] = `
{
"flex": 1,
"padding": 0,
"textAlignVertical": undefined,
},
{
"color": "#20242D",
Expand Down Expand Up @@ -987,6 +998,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly wrong 2`] = `
{
"flex": 1,
"padding": 0,
"textAlignVertical": undefined,
},
{
"color": "#20242D",
Expand Down Expand Up @@ -1118,6 +1130,7 @@ exports[`@lad-tech/mobydick-core/InputField renders title titleProps 1`] = `
{
"flex": 1,
"padding": 0,
"textAlignVertical": undefined,
},
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ const defaultStyle = (
marginVertical: spaces.Space8,
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: multiline ? 'flex-start' : 'center',
alignItems: multiline ? undefined : 'center',
paddingVertical: multiline ? spaces.Space12 : 0,
},
textInput: {
flex: 1,
textAlignVertical: multiline ? 'top' : undefined,
padding: 0, // Android по дефолту ставит padding на input's
},

Expand Down

0 comments on commit 221d476

Please sign in to comment.