import React, { forwardRef, useRef } from 'react'; import mergeRefs from 'react-merge-refs'; import { CSSTransition } from 'react-transition-group'; import cn from 'classnames'; import { CalendarDesktop, type CalendarDesktopProps, } from '@alfalab/core-components-calendar/desktop'; import { Skeleton } from '@alfalab/core-components-skeleton'; import styles from './index.module.css'; export type CalendarWithSkeletonProps = CalendarDesktopProps & { /** * Флаг включения анимации скелета */ animate?: boolean; /** * Флаг управлением видимостью календаря */ calendarVisible?: boolean; }; export const CalendarWithSkeleton = forwardRef( ({ calendarVisible = true, animate = true, className, ...restProps }, ref) => { const skeletonProps = { visible: true, animate }; const nodeRef = useRef(null); return (
{calendarVisible && }
); }, ); CalendarWithSkeleton.displayName = 'CalendarWithSkeleton';