Skip to content

Commit

Permalink
chore: fix example for transparent modal
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Nov 27, 2022
1 parent e411a28 commit 4aecf13
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions example/src/Screens/StackTransparent.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { ParamListBase, useTheme } from '@react-navigation/native';
import {
createNativeStackNavigator as createStackNavigator,
NativeStackScreenProps as StackScreenProps,
} from '@react-navigation/native-stack';
createStackNavigator,
StackScreenProps,
useCardAnimation,
} from '@react-navigation/stack';
import * as React from 'react';
import {
Animated,
Expand Down Expand Up @@ -92,7 +93,7 @@ const DialogScreen = ({
navigation,
}: StackScreenProps<TransparentStackParams>) => {
const { colors } = useTheme();
// const { current } = useCardAnimation();
const { current } = useCardAnimation();

return (
<View style={styles.container}>
Expand All @@ -102,15 +103,15 @@ const DialogScreen = ({
styles.dialog,
{
backgroundColor: colors.card,
// transform: [
// {
// scale: current.progress.interpolate({
// inputRange: [0, 1],
// outputRange: [0.9, 1],
// extrapolate: 'clamp',
// }),
// },
// ],
transform: [
{
scale: current.progress.interpolate({
inputRange: [0, 1],
outputRange: [0.9, 1],
extrapolate: 'clamp',
}),
},
],
},
]}
>
Expand Down

0 comments on commit 4aecf13

Please sign in to comment.