From cc94baea2af5843c98be58dd74c5856a51d00511 Mon Sep 17 00:00:00 2001 From: Chzapps India <65512279+chzappsinc@users.noreply.github.com> Date: Tue, 30 Aug 2022 15:16:34 +0530 Subject: [PATCH 1/2] BorderRadius 10 for windows and macos --- ToggleSwitch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ToggleSwitch.js b/ToggleSwitch.js index 9e51915..6a2a185 100644 --- a/ToggleSwitch.js +++ b/ToggleSwitch.js @@ -104,7 +104,7 @@ export default class ToggleSwitch extends React.Component { { justifyContent: "center", width: this.dimensions.width, - borderRadius: 20, + borderRadius: Platform.OS == "windows" || Platform.OS == "macos" ? 10 : 20, padding: this.dimensions.padding, backgroundColor: this.props.isOn ? this.props.onColor From b678f846a9b5a3c0cbc915cabc79767a1b75a69b Mon Sep 17 00:00:00 2001 From: Chzapps India <65512279+chzappsinc@users.noreply.github.com> Date: Tue, 30 Aug 2022 20:42:38 +0530 Subject: [PATCH 2/2] Update ToggleSwitch.js --- ToggleSwitch.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ToggleSwitch.js b/ToggleSwitch.js index 6a2a185..3ce8f06 100644 --- a/ToggleSwitch.js +++ b/ToggleSwitch.js @@ -109,6 +109,9 @@ export default class ToggleSwitch extends React.Component { backgroundColor: this.props.isOn ? this.props.onColor : this.props.offColor, + paddingBottom : Platform.OS == "windows" || Platform.OS == "macos" + ? this.dimensions.padding + 2 + : this.dimensions.padding }, this.props.isOn ? this.props.trackOnStyle : this.props.trackOffStyle, ]; @@ -121,9 +124,9 @@ export default class ToggleSwitch extends React.Component { left: Platform.OS === "web" ? 4 : 0, position: "absolute", backgroundColor: this.props.circleColor, - transform: [{ translateX: this.offsetX }], + transform: [{ translateX: this.offsetX }], width: this.dimensions.circleWidth, - height: this.dimensions.circleHeight, + height: this.dimensions.circleHeight , borderRadius: this.dimensions.circleWidth / 2, shadowColor: "#000", shadowOffset: {