From 47b2a0bbbe246bd0a10e288df4296b2285099f9f Mon Sep 17 00:00:00 2001 From: Vasilii Date: Mon, 5 Sep 2022 13:53:25 +1000 Subject: [PATCH 1/2] Fix reference --- src/customSwitch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/customSwitch.js b/src/customSwitch.js index c638fc1..1009dbb 100644 --- a/src/customSwitch.js +++ b/src/customSwitch.js @@ -1,7 +1,7 @@ import React, { useState, useEffect, useRef } from 'react'; import { View, StyleSheet, Text, TouchableWithoutFeedback, Animated, LayoutAnimation, Platform, UIManager } from 'react-native'; -import hexToRgb from './hexToRgb'; +import hexToRgb from './utils'; if (Platform.OS === 'android') { if (UIManager.setLayoutAnimationEnabledExperimental) { From 115eb03fd72d46f9180a3cc0db301504ca3c9629 Mon Sep 17 00:00:00 2001 From: Vasilii Date: Mon, 5 Sep 2022 14:21:45 +1000 Subject: [PATCH 2/2] Fix animation config --- src/customSwitch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/customSwitch.js b/src/customSwitch.js index 1009dbb..9a651d8 100644 --- a/src/customSwitch.js +++ b/src/customSwitch.js @@ -52,7 +52,7 @@ export default function CustomSwitch({ LayoutAnimation.configureNext( LayoutAnimation.create( animationSpeed ? animationSpeed : defaultValues.animationSpeed, - LayoutAnimation.Types.Spring, + LayoutAnimation.Types.easeOut, LayoutAnimation.Properties.opacity ) )