React 18 and Vite (#4510)

This commit is contained in:
Matthew Penner 2022-11-25 13:25:03 -07:00 committed by GitHub
parent 1bb1b13f6d
commit 21613fa602
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
244 changed files with 4547 additions and 8933 deletions

View file

@ -1,16 +1,18 @@
import React from 'react';
import { Transition } from '@headlessui/react';
import type { ElementType, ReactNode } from 'react';
type Duration = `duration-${number}`;
interface Props {
as?: React.ElementType;
as?: ElementType;
duration?: Duration | [Duration, Duration];
appear?: boolean;
unmount?: boolean;
show: boolean;
children: React.ReactNode;
children: ReactNode;
}
export default ({ children, duration, ...props }: Props) => {
function FadeTransition({ children, duration, ...props }: Props) {
const [enterDuration, exitDuration] = Array.isArray(duration)
? duration
: !duration
@ -30,4 +32,6 @@ export default ({ children, duration, ...props }: Props) => {
{children}
</Transition>
);
};
}
export default FadeTransition;