From 267852c50dfbaf816fb8574f6a9b7ec6974a42e0 Mon Sep 17 00:00:00 2001 From: Rafael Caferati Date: Sat, 16 Feb 2019 18:27:20 -0200 Subject: [PATCH] fix active background on-stretch --- src/__tests__/__snapshots__/index.test.js.snap | 5 +---- src/styles.js | 9 ++++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/__tests__/__snapshots__/index.test.js.snap b/src/__tests__/__snapshots__/index.test.js.snap index 3a99a52..d12cd54 100644 --- a/src/__tests__/__snapshots__/index.test.js.snap +++ b/src/__tests__/__snapshots__/index.test.js.snap @@ -14,7 +14,6 @@ exports[`AwesomeButton should render 1`] = ` "backgroundColor": "transparent", "height": 60, "opacity": 0, - "paddingBottom": 0, "width": null, "zIndex": 10, } @@ -92,7 +91,6 @@ exports[`AwesomeButton should render 1`] = ` "borderColor": null, "borderRadius": 4, "borderWidth": 0, - "paddingHorizontal": 12, }, ] } @@ -147,7 +145,6 @@ exports[`AwesomeButton should render a default text children 1`] = ` "backgroundColor": "transparent", "height": 60, "opacity": 0, - "paddingBottom": 0, "width": null, "zIndex": 10, } @@ -225,7 +222,6 @@ exports[`AwesomeButton should render a default text children 1`] = ` "borderColor": null, "borderRadius": 4, "borderWidth": 0, - "paddingHorizontal": 12, }, ] } @@ -257,6 +253,7 @@ exports[`AwesomeButton should render a default text children 1`] = ` "fontWeight": "bold", "opacity": 1, "paddingBottom": 0, + "paddingHorizontal": 12, "paddingTop": 0, "textAlign": "center", "transform": Array [ diff --git a/src/styles.js b/src/styles.js index a37e910..3715e14 100644 --- a/src/styles.js +++ b/src/styles.js @@ -36,15 +36,15 @@ const memoized = memoize( return StyleSheet.create({ container: { height: calcHeight, - width: calcWidth, - paddingBottom + width: calcWidth }, container__text: { color: textColor, fontSize: textSize, fontFamily: textFontFamily, paddingBottom, - paddingTop + paddingTop, + paddingHorizontal }, container__placeholder: { height: textLineHeight, @@ -77,8 +77,7 @@ const memoized = memoize( borderColor, borderWidth, borderRadius, - backgroundColor, - paddingHorizontal + backgroundColor } }); }