mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-29 10:16:32 +02:00
22 lines
624 B
TypeScript
22 lines
624 B
TypeScript
import { Transition } from "@headlessui/react";
|
|
import * as React from "react";
|
|
|
|
export const TransitionPopInOut: React.VoidFunctionComponent<{
|
|
children: React.ReactNode;
|
|
show?: boolean;
|
|
}> = ({ children, show }) => {
|
|
return (
|
|
<Transition
|
|
show={show}
|
|
as={React.Fragment}
|
|
enter="transition ease-out duration-100"
|
|
enterFrom="transform opacity-0 scale-95"
|
|
enterTo="transform opacity-100 scale-100"
|
|
leave="transition ease-in duration-75"
|
|
leaveFrom="transform opacity-100 scale-100"
|
|
leaveTo="transform opacity-0 scale-95"
|
|
>
|
|
{children}
|
|
</Transition>
|
|
);
|
|
};
|