Skip to content

Commit 470f9cc

Browse files
committed
fix: icons fixed height
1 parent 3a5579e commit 470f9cc

2 files changed

Lines changed: 22 additions & 12 deletions

File tree

src/components/TextField/styles.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,20 @@ export const $counterStyle: TextStyle = {
4848

4949
export const $trailingAccessoryStyle: ViewStyle = {
5050
width: ACCESSORY_SIZE,
51-
marginEnd: TEXT_FIELD_ACCESSORY_MARGIN_HORIZONTAL,
52-
alignSelf: 'stretch',
51+
height: ACCESSORY_SIZE,
52+
alignSelf: 'center',
5353
justifyContent: 'center',
5454
alignItems: 'center',
55+
marginEnd: TEXT_FIELD_ACCESSORY_MARGIN_HORIZONTAL,
5556
};
5657

5758
export const $leadingAccessoryStyle: ViewStyle = {
5859
width: ACCESSORY_SIZE,
59-
marginStart: TEXT_FIELD_ACCESSORY_MARGIN_HORIZONTAL,
60-
alignSelf: 'stretch',
60+
height: ACCESSORY_SIZE,
61+
alignSelf: 'center',
6162
justifyContent: 'center',
6263
alignItems: 'center',
64+
marginStart: TEXT_FIELD_ACCESSORY_MARGIN_HORIZONTAL,
6365
};
6466

6567
export const $disabledStyle: ViewStyle = {

src/components/__tests__/__snapshots__/TextField.test.tsx.snap

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ exports[`renders filled TextField with TextField.Icon accessories 1`] = `
236236
[
237237
{
238238
"alignItems": "center",
239-
"alignSelf": "stretch",
239+
"alignSelf": "center",
240+
"height": 24,
240241
"justifyContent": "center",
241242
"marginStart": 12,
242243
"width": 24,
@@ -481,7 +482,8 @@ exports[`renders filled TextField with TextField.Icon accessories 1`] = `
481482
[
482483
{
483484
"alignItems": "center",
484-
"alignSelf": "stretch",
485+
"alignSelf": "center",
486+
"height": 24,
485487
"justifyContent": "center",
486488
"marginEnd": 12,
487489
"width": 24,
@@ -880,7 +882,8 @@ exports[`renders filled TextField with TextField.Icon accessories when status is
880882
[
881883
{
882884
"alignItems": "center",
883-
"alignSelf": "stretch",
885+
"alignSelf": "center",
886+
"height": 24,
884887
"justifyContent": "center",
885888
"marginStart": 12,
886889
"width": 24,
@@ -1125,7 +1128,8 @@ exports[`renders filled TextField with TextField.Icon accessories when status is
11251128
[
11261129
{
11271130
"alignItems": "center",
1128-
"alignSelf": "stretch",
1131+
"alignSelf": "center",
1132+
"height": 24,
11291133
"justifyContent": "center",
11301134
"marginEnd": 12,
11311135
"width": 24,
@@ -1802,7 +1806,8 @@ exports[`renders outlined TextField with TextField.Icon accessories 1`] = `
18021806
[
18031807
{
18041808
"alignItems": "center",
1805-
"alignSelf": "stretch",
1809+
"alignSelf": "center",
1810+
"height": 24,
18061811
"justifyContent": "center",
18071812
"marginStart": 12,
18081813
"width": 24,
@@ -2047,7 +2052,8 @@ exports[`renders outlined TextField with TextField.Icon accessories 1`] = `
20472052
[
20482053
{
20492054
"alignItems": "center",
2050-
"alignSelf": "stretch",
2055+
"alignSelf": "center",
2056+
"height": 24,
20512057
"justifyContent": "center",
20522058
"marginEnd": 12,
20532059
"width": 24,
@@ -2404,7 +2410,8 @@ exports[`renders outlined TextField with TextField.Icon accessories when status
24042410
[
24052411
{
24062412
"alignItems": "center",
2407-
"alignSelf": "stretch",
2413+
"alignSelf": "center",
2414+
"height": 24,
24082415
"justifyContent": "center",
24092416
"marginStart": 12,
24102417
"width": 24,
@@ -2649,7 +2656,8 @@ exports[`renders outlined TextField with TextField.Icon accessories when status
26492656
[
26502657
{
26512658
"alignItems": "center",
2652-
"alignSelf": "stretch",
2659+
"alignSelf": "center",
2660+
"height": 24,
26532661
"justifyContent": "center",
26542662
"marginEnd": 12,
26552663
"width": 24,

0 commit comments

Comments
 (0)