Skip to content

Commit 42d6b1a

Browse files
authored
View - add reanimated props for layout animation (wix#2694)
1 parent 1b97d95 commit 42d6b1a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/components/view/index.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
import {useModifiers, useThemeProps} from 'hooks';
22
import React, {useEffect, useMemo, useState} from 'react';
33
import {View as RNView, SafeAreaView, Animated, ViewProps as RNViewProps, StyleProp, ViewStyle} from 'react-native';
4+
import type {AnimateProps as RNReanimatedProps} from 'react-native-reanimated';
45
import {Constants, ContainerModifiers} from '../../commons/new';
56
import type {ThemeComponent} from '../../typings/common';
67
import type {RecorderProps} from '../../typings/recorderTypes';
78

8-
export interface ViewProps extends Omit<RNViewProps, 'style'>, ThemeComponent, ContainerModifiers, RecorderProps {
9+
/**
10+
* Extra props when using reanimated (only non experimental props)
11+
*/
12+
type ReanimatedProps = Pick<RNReanimatedProps<object>, 'entering' | 'exiting' | 'layout'>;
13+
14+
export interface ViewProps
15+
extends Omit<RNViewProps, 'style'>,
16+
ReanimatedProps,
17+
ThemeComponent,
18+
ContainerModifiers,
19+
RecorderProps {
920
/**
1021
* If true, will render as SafeAreaView
1122
*/

0 commit comments

Comments
 (0)