Skip to content

View - add reanimated props for layout animation #2694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/components/view/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
import {useModifiers, useThemeProps} from 'hooks';
import React, {useEffect, useMemo, useState} from 'react';
import {View as RNView, SafeAreaView, Animated, ViewProps as RNViewProps, StyleProp, ViewStyle} from 'react-native';
import type {AnimateProps as RNReanimatedProps} from 'react-native-reanimated';
import {Constants, ContainerModifiers} from '../../commons/new';
import type {ThemeComponent} from '../../typings/common';
import type {RecorderProps} from '../../typings/recorderTypes';

export interface ViewProps extends Omit<RNViewProps, 'style'>, ThemeComponent, ContainerModifiers, RecorderProps {
/**
* Extra props when using reanimated (only non experimental props)
*/
type ReanimatedProps = Pick<RNReanimatedProps<object>, 'entering' | 'exiting' | 'layout'>;

export interface ViewProps
extends Omit<RNViewProps, 'style'>,
ReanimatedProps,
ThemeComponent,
ContainerModifiers,
RecorderProps {
/**
* If true, will render as SafeAreaView
*/
Expand Down