Skip to content

Commit 8df1556

Browse files
committed
Implemented bottom key for contentInset prop
1 parent b91c2b8 commit 8df1556

File tree

6 files changed

+32
-26
lines changed

6 files changed

+32
-26
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- `bottom` key for `contentInset` prop
13+
1014
## [0.16.0] - 2019-10-24
1115

1216
### Added

src/components/field-filled/__snapshots__/test.js.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ exports[`renders 1`] = `
150150
"alignItems": "flex-start",
151151
"flexDirection": "row",
152152
"justifyContent": "flex-end",
153-
"minHeight": 8,
154153
},
155154
Object {
155+
"minHeight": 8,
156156
"paddingLeft": 12,
157157
"paddingRight": 12,
158158
},
@@ -313,9 +313,9 @@ exports[`renders accessory 1`] = `
313313
"alignItems": "flex-start",
314314
"flexDirection": "row",
315315
"justifyContent": "flex-end",
316-
"minHeight": 8,
317316
},
318317
Object {
318+
"minHeight": 8,
319319
"paddingLeft": 12,
320320
"paddingRight": 12,
321321
},
@@ -475,9 +475,9 @@ exports[`renders counter 1`] = `
475475
"alignItems": "flex-start",
476476
"flexDirection": "row",
477477
"justifyContent": "flex-end",
478-
"minHeight": 8,
479478
},
480479
Object {
480+
"minHeight": 8,
481481
"paddingLeft": 12,
482482
"paddingRight": 12,
483483
},
@@ -660,9 +660,9 @@ exports[`renders disabled value 1`] = `
660660
"alignItems": "flex-start",
661661
"flexDirection": "row",
662662
"justifyContent": "flex-end",
663-
"minHeight": 8,
664663
},
665664
Object {
665+
"minHeight": 8,
666666
"paddingLeft": 12,
667667
"paddingRight": 12,
668668
},
@@ -822,9 +822,9 @@ exports[`renders title 1`] = `
822822
"alignItems": "flex-start",
823823
"flexDirection": "row",
824824
"justifyContent": "flex-end",
825-
"minHeight": 8,
826825
},
827826
Object {
827+
"minHeight": 8,
828828
"paddingLeft": 12,
829829
"paddingRight": 12,
830830
},
@@ -1001,9 +1001,9 @@ exports[`renders value 1`] = `
10011001
"alignItems": "flex-start",
10021002
"flexDirection": "row",
10031003
"justifyContent": "flex-end",
1004-
"minHeight": 8,
10051004
},
10061005
Object {
1006+
"minHeight": 8,
10071007
"paddingLeft": 12,
10081008
"paddingRight": 12,
10091009
},

src/components/field-outlined/__snapshots__/test.js.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ exports[`renders 1`] = `
270270
"alignItems": "flex-start",
271271
"flexDirection": "row",
272272
"justifyContent": "flex-end",
273-
"minHeight": 8,
274273
},
275274
Object {
275+
"minHeight": 8,
276276
"paddingLeft": 12,
277277
"paddingRight": 12,
278278
},
@@ -553,9 +553,9 @@ exports[`renders accessory 1`] = `
553553
"alignItems": "flex-start",
554554
"flexDirection": "row",
555555
"justifyContent": "flex-end",
556-
"minHeight": 8,
557556
},
558557
Object {
558+
"minHeight": 8,
559559
"paddingLeft": 12,
560560
"paddingRight": 12,
561561
},
@@ -835,9 +835,9 @@ exports[`renders counter 1`] = `
835835
"alignItems": "flex-start",
836836
"flexDirection": "row",
837837
"justifyContent": "flex-end",
838-
"minHeight": 8,
839838
},
840839
Object {
840+
"minHeight": 8,
841841
"paddingLeft": 12,
842842
"paddingRight": 12,
843843
},
@@ -1136,9 +1136,9 @@ exports[`renders disabled value 1`] = `
11361136
"alignItems": "flex-start",
11371137
"flexDirection": "row",
11381138
"justifyContent": "flex-end",
1139-
"minHeight": 8,
11401139
},
11411140
Object {
1141+
"minHeight": 8,
11421142
"paddingLeft": 12,
11431143
"paddingRight": 12,
11441144
},
@@ -1418,9 +1418,9 @@ exports[`renders title 1`] = `
14181418
"alignItems": "flex-start",
14191419
"flexDirection": "row",
14201420
"justifyContent": "flex-end",
1421-
"minHeight": 8,
14221421
},
14231422
Object {
1423+
"minHeight": 8,
14241424
"paddingLeft": 12,
14251425
"paddingRight": 12,
14261426
},
@@ -1717,9 +1717,9 @@ exports[`renders value 1`] = `
17171717
"alignItems": "flex-start",
17181718
"flexDirection": "row",
17191719
"justifyContent": "flex-end",
1720-
"minHeight": 8,
17211720
},
17221721
Object {
1722+
"minHeight": 8,
17231723
"paddingLeft": 12,
17241724
"paddingRight": 12,
17251725
},

src/components/field/__snapshots__/test.js.snap

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ exports[`renders 1`] = `
147147
"alignItems": "flex-start",
148148
"flexDirection": "row",
149149
"justifyContent": "flex-end",
150-
"minHeight": 8,
151150
},
152151
Object {
152+
"minHeight": 8,
153153
"paddingLeft": 0,
154154
"paddingRight": 0,
155155
},
@@ -306,9 +306,9 @@ exports[`renders counter 1`] = `
306306
"alignItems": "flex-start",
307307
"flexDirection": "row",
308308
"justifyContent": "flex-end",
309-
"minHeight": 8,
310309
},
311310
Object {
311+
"minHeight": 8,
312312
"paddingLeft": 0,
313313
"paddingRight": 0,
314314
},
@@ -488,9 +488,9 @@ exports[`renders default value 1`] = `
488488
"alignItems": "flex-start",
489489
"flexDirection": "row",
490490
"justifyContent": "flex-end",
491-
"minHeight": 8,
492491
},
493492
Object {
493+
"minHeight": 8,
494494
"paddingLeft": 0,
495495
"paddingRight": 0,
496496
},
@@ -647,9 +647,9 @@ exports[`renders disabled value 1`] = `
647647
"alignItems": "flex-start",
648648
"flexDirection": "row",
649649
"justifyContent": "flex-end",
650-
"minHeight": 8,
651650
},
652651
Object {
652+
"minHeight": 8,
653653
"paddingLeft": 0,
654654
"paddingRight": 0,
655655
},
@@ -806,9 +806,9 @@ exports[`renders error 1`] = `
806806
"alignItems": "flex-start",
807807
"flexDirection": "row",
808808
"justifyContent": "flex-end",
809-
"minHeight": 8,
810809
},
811810
Object {
811+
"minHeight": 8,
812812
"paddingLeft": 0,
813813
"paddingRight": 0,
814814
},
@@ -983,9 +983,9 @@ exports[`renders left accessory 1`] = `
983983
"alignItems": "flex-start",
984984
"flexDirection": "row",
985985
"justifyContent": "flex-end",
986-
"minHeight": 8,
987986
},
988987
Object {
988+
"minHeight": 8,
989989
"paddingLeft": 0,
990990
"paddingRight": 0,
991991
},
@@ -1148,9 +1148,9 @@ exports[`renders multiline value 1`] = `
11481148
"alignItems": "flex-start",
11491149
"flexDirection": "row",
11501150
"justifyContent": "flex-end",
1151-
"minHeight": 8,
11521151
},
11531152
Object {
1153+
"minHeight": 8,
11541154
"paddingLeft": 0,
11551155
"paddingRight": 0,
11561156
},
@@ -1332,9 +1332,9 @@ exports[`renders prefix 1`] = `
13321332
"alignItems": "flex-start",
13331333
"flexDirection": "row",
13341334
"justifyContent": "flex-end",
1335-
"minHeight": 8,
13361335
},
13371336
Object {
1337+
"minHeight": 8,
13381338
"paddingLeft": 0,
13391339
"paddingRight": 0,
13401340
},
@@ -1491,9 +1491,9 @@ exports[`renders restriction 1`] = `
14911491
"alignItems": "flex-start",
14921492
"flexDirection": "row",
14931493
"justifyContent": "flex-end",
1494-
"minHeight": 8,
14951494
},
14961495
Object {
1496+
"minHeight": 8,
14971497
"paddingLeft": 0,
14981498
"paddingRight": 0,
14991499
},
@@ -1674,9 +1674,9 @@ exports[`renders right accessory 1`] = `
16741674
"alignItems": "flex-start",
16751675
"flexDirection": "row",
16761676
"justifyContent": "flex-end",
1677-
"minHeight": 8,
16781677
},
16791678
Object {
1679+
"minHeight": 8,
16801680
"paddingLeft": 0,
16811681
"paddingRight": 0,
16821682
},
@@ -1858,9 +1858,9 @@ exports[`renders suffix 1`] = `
18581858
"alignItems": "flex-start",
18591859
"flexDirection": "row",
18601860
"justifyContent": "flex-end",
1861-
"minHeight": 8,
18621861
},
18631862
Object {
1863+
"minHeight": 8,
18641864
"paddingLeft": 0,
18651865
"paddingRight": 0,
18661866
},
@@ -2017,9 +2017,9 @@ exports[`renders title 1`] = `
20172017
"alignItems": "flex-start",
20182018
"flexDirection": "row",
20192019
"justifyContent": "flex-end",
2020-
"minHeight": 8,
20212020
},
20222021
Object {
2022+
"minHeight": 8,
20232023
"paddingLeft": 0,
20242024
"paddingRight": 0,
20252025
},
@@ -2193,9 +2193,9 @@ exports[`renders value 1`] = `
21932193
"alignItems": "flex-start",
21942194
"flexDirection": "row",
21952195
"justifyContent": "flex-end",
2196-
"minHeight": 8,
21972196
},
21982197
Object {
2198+
"minHeight": 8,
21992199
"paddingLeft": 0,
22002200
"paddingRight": 0,
22012201
},

src/components/field/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export default class TextField extends PureComponent {
7979
input: PropTypes.number,
8080
left: PropTypes.number,
8181
right: PropTypes.number,
82+
bottom: PropTypes.number,
8283
}),
8384

8485
labelOffset: Label.propTypes.offset,
@@ -128,6 +129,7 @@ export default class TextField extends PureComponent {
128129
input: 8,
129130
left: 0,
130131
right: 0,
132+
bottom: 8,
131133
};
132134

133135
static labelOffset = {
@@ -570,6 +572,7 @@ export default class TextField extends PureComponent {
570572
let containerStyle = {
571573
paddingLeft: contentInset.left,
572574
paddingRight: contentInset.right,
575+
minHeight: contentInset.bottom,
573576
};
574577

575578
let styleProps = {

src/components/field/styles.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export default StyleSheet.create({
2222
},
2323

2424
helperContainer: {
25-
minHeight: 8,
2625
flexDirection: 'row',
2726
justifyContent: 'flex-end',
2827
alignItems: 'flex-start',

0 commit comments

Comments
 (0)