From 233bf45244aec060fa2f25c1e88b22977baeedff Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Mon, 4 Jun 2018 16:35:58 +0200 Subject: [PATCH] fix: vertically center label on iOS --- src/components/Chip.js | 1 + src/components/__tests__/__snapshots__/Chip.test.js.snap | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/components/Chip.js b/src/components/Chip.js index d096e69..cc91aab 100644 --- a/src/components/Chip.js +++ b/src/components/Chip.js @@ -260,6 +260,7 @@ const styles = StyleSheet.create({ }, text: { height: 24, + lineHeight: 24, textAlignVertical: 'center', marginVertical: 4, }, diff --git a/src/components/__tests__/__snapshots__/Chip.test.js.snap b/src/components/__tests__/__snapshots__/Chip.test.js.snap index b39013d..23d01a1 100644 --- a/src/components/__tests__/__snapshots__/Chip.test.js.snap +++ b/src/components/__tests__/__snapshots__/Chip.test.js.snap @@ -95,6 +95,7 @@ exports[`renders chip with icon 1`] = ` Array [ Object { "height": 24, + "lineHeight": 24, "marginVertical": 4, "textAlignVertical": "center", }, @@ -196,6 +197,7 @@ exports[`renders chip with onPress 1`] = ` Array [ Object { "height": 24, + "lineHeight": 24, "marginVertical": 4, "textAlignVertical": "center", }, @@ -332,6 +334,7 @@ exports[`renders deletable chip 1`] = ` Array [ Object { "height": 24, + "lineHeight": 24, "marginVertical": 4, "textAlignVertical": "center", }, @@ -433,6 +436,7 @@ exports[`renders outlined disabled chip 1`] = ` Array [ Object { "height": 24, + "lineHeight": 24, "marginVertical": 4, "textAlignVertical": "center", }, @@ -569,6 +573,7 @@ exports[`renders selected chip 1`] = ` Array [ Object { "height": 24, + "lineHeight": 24, "marginVertical": 4, "textAlignVertical": "center", },