mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 10:27:49 +00:00
Major changes: - Redesign cabinet with Linear-style components and top navigation - Replace detail modals with dedicated pages (users, broadcasts, email templates) - Add email channel support for broadcasts - Remove pull-to-refresh, improve drag-and-drop on touch devices - Fix Telegram Mini App: fullscreen, back button, scroll restoration - Unify admin pages color scheme to design system - Mobile-first improvements: horizontal tabs for settings, better touch targets
34 lines
848 B
TypeScript
34 lines
848 B
TypeScript
import { motion, type HTMLMotionProps } from 'framer-motion';
|
|
import { forwardRef, type ReactNode } from 'react';
|
|
import { fadeIn, fadeInTransition } from './transitions';
|
|
|
|
interface FadeInProps extends Omit<HTMLMotionProps<'div'>, 'initial' | 'animate' | 'exit'> {
|
|
children: ReactNode;
|
|
delay?: number;
|
|
duration?: number;
|
|
}
|
|
|
|
export const FadeIn = forwardRef<HTMLDivElement, FadeInProps>(
|
|
({ children, delay = 0, duration, ...props }, ref) => {
|
|
return (
|
|
<motion.div
|
|
ref={ref}
|
|
variants={fadeIn}
|
|
initial="initial"
|
|
animate="animate"
|
|
exit="exit"
|
|
transition={{
|
|
...fadeInTransition,
|
|
delay,
|
|
...(duration !== undefined && { duration }),
|
|
}}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</motion.div>
|
|
);
|
|
},
|
|
);
|
|
|
|
FadeIn.displayName = 'FadeIn';
|