From 75878a5bcb13c1b9ba8348488b3e5899a0e98a84 Mon Sep 17 00:00:00 2001 From: Marco Cesarato Date: Sun, 31 Jan 2021 23:43:56 +0100 Subject: [PATCH] fix: issues with outlines Closes #30 #31 --- src/InputSpinner.js | 3 +-- src/Style.js | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/InputSpinner.js b/src/InputSpinner.js index 0d38088..f2e3b39 100644 --- a/src/InputSpinner.js +++ b/src/InputSpinner.js @@ -807,8 +807,7 @@ class InputSpinner extends Component { fontFamily: this.props.fontFamily, borderColor: this.props.showBorder ? this._getColor() : "transparent", backgroundColor: this.props.background, - height: this.props.height, - flex: 1, + height: this.props.height }, this.props.inputStyle, ]; diff --git a/src/Style.js b/src/Style.js index fa693b3..58be1ce 100644 --- a/src/Style.js +++ b/src/Style.js @@ -3,7 +3,7 @@ * @author Marco Cesarato */ -import {StyleSheet} from "react-native"; +import {Platform, StyleSheet} from "react-native"; export const Style = StyleSheet.create({ container: { @@ -31,7 +31,12 @@ export const Style = StyleSheet.create({ alignItems: "center", justifyContent: "center", borderRadius: 999, - outlineWidth: 0, + ...Platform.select({ + web: { + outlineWidth: 0, + outline: "none" + }, + }) }, buttonText: { color: "white", @@ -41,6 +46,12 @@ export const Style = StyleSheet.create({ flex: 1, textAlign: "center", justifyContent: "center", - outlineWidth: 0, + borderWidth: 0, + ...Platform.select({ + web: { + outlineWidth: 0, + outline: "none" + }, + }) }, });