Skip to content

Commit

Permalink
feat(app): fadein Pane(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
hbriese committed Jul 22, 2024
1 parent b7b03f1 commit 4721ced
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/src/components/layout/Pane.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { createStyles, useStyles } from '@theme/styles';
import { useAtomValue, useSetAtom } from 'jotai';
import { useLayoutEffect, useRef } from 'react';
import { View, ViewProps } from 'react-native';
import { ViewProps } from 'react-native';
import { PANES_MOUNTED } from './Panes';
import { BREAKPOINTS } from '@theme/styles';
import Animated, { FadeIn } from 'react-native-reanimated';

const MAX_PANES: Record<keyof typeof BREAKPOINTS, number> = {
compact: 1,
Expand Down Expand Up @@ -33,8 +34,10 @@ export function Pane({ padding = true, flex, fixed: _, ...props }: PaneProps) {
const fixed = !flex && count !== 1;

return (
<View
<Animated.View
{...props}
entering={FadeIn.duration(200)}
// exiting depends on how the pane was removed
style={[styles.flex, fixed && styles.fixed, padding && styles.margins, props.style]}
/>
);
Expand Down

0 comments on commit 4721ced

Please sign in to comment.