From ca6685bf9a415c1ff259d8978ab5ff5b39d0a418 Mon Sep 17 00:00:00 2001 From: Mo Gorhom Date: Tue, 21 Apr 2020 22:29:22 +0200 Subject: [PATCH] chore: fix internal types --- src/button/PaperOnboardingButton.tsx | 3 +-- src/indicator/PaperOnboardingIndicator.tsx | 4 ++-- .../PaperOnboardingIndicatorsContainer.tsx | 2 +- src/page/PaperOnboardingPage.tsx | 10 ++++++---- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/button/PaperOnboardingButton.tsx b/src/button/PaperOnboardingButton.tsx index e0f9bd7..ddd8619 100644 --- a/src/button/PaperOnboardingButton.tsx +++ b/src/button/PaperOnboardingButton.tsx @@ -1,7 +1,6 @@ import React, { useMemo } from 'react'; import { Text, TouchableOpacity, TextStyle } from 'react-native'; import Animated, { round } from 'react-native-reanimated'; -// import { TouchableOpacity } from 'react-native-gesture-handler'; import { PaperOnboardingSafeAreaInsetsType } from '../types'; import { styles } from './styles'; @@ -35,7 +34,7 @@ export const PaperOnboardingButton = (props: PaperOnboardingButtonProps) => { }); // styles - const containerStyle = useMemo( + const containerStyle: any = useMemo( () => [ styles.container, { diff --git a/src/indicator/PaperOnboardingIndicator.tsx b/src/indicator/PaperOnboardingIndicator.tsx index 8c48049..62c5956 100644 --- a/src/indicator/PaperOnboardingIndicator.tsx +++ b/src/indicator/PaperOnboardingIndicator.tsx @@ -69,7 +69,7 @@ export const PaperOnboardingIndicator = ( [size, color] ); - const fillStyle = useMemo( + const fillStyle: any = useMemo( () => [ styles.fill, { @@ -81,7 +81,7 @@ export const PaperOnboardingIndicator = ( [color, size, animatedBackgroundOpacity] ); - const iconStyle = useMemo( + const iconStyle: any = useMemo( () => [ styles.iconContainer, { diff --git a/src/indicatorsContainer/PaperOnboardingIndicatorsContainer.tsx b/src/indicatorsContainer/PaperOnboardingIndicatorsContainer.tsx index 679c009..7830390 100644 --- a/src/indicatorsContainer/PaperOnboardingIndicatorsContainer.tsx +++ b/src/indicatorsContainer/PaperOnboardingIndicatorsContainer.tsx @@ -35,7 +35,7 @@ export const PaperOnboardingIndicatorsContainer = ( }, [data, indicatorSize]); // style - const containerStyle = useMemo( + const containerStyle: any = useMemo( () => [ styles.container, { diff --git a/src/page/PaperOnboardingPage.tsx b/src/page/PaperOnboardingPage.tsx index 5a99c21..6442990 100644 --- a/src/page/PaperOnboardingPage.tsx +++ b/src/page/PaperOnboardingPage.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from 'react'; import { Text, TextStyle } from 'react-native'; import { Svg, Circle } from 'react-native-svg'; -import Animated, { add } from 'react-native-reanimated'; +import Animated from 'react-native-reanimated'; import { PaperOnboardingItemType, PaperOnboardingSafeAreaInsetsType, @@ -9,7 +9,7 @@ import { } from '../types'; import { styles } from './styles'; -const { interpolate, Extrapolate } = Animated; +const { interpolate, add, Extrapolate } = Animated; const AnimatedCircle = Animated.createAnimatedComponent(Circle); interface PaperOnboardingPageProps { @@ -83,7 +83,7 @@ export const PaperOnboardingPage = (props: PaperOnboardingPageProps) => { ); // styles - const contentContainerStyle = useMemo( + const contentContainerStyle: any = useMemo( () => [ styles.contentContainer, { @@ -121,7 +121,7 @@ export const PaperOnboardingPage = (props: PaperOnboardingPageProps) => { [item, descriptionStyleOverride] ); - const imageContainerStyle = useMemo( + const imageContainerStyle: any = useMemo( () => [ styles.imageContainer, { @@ -135,8 +135,10 @@ export const PaperOnboardingPage = (props: PaperOnboardingPageProps) => {