mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
25 lines
520 B
TypeScript
25 lines
520 B
TypeScript
import React, { FC, ReactNode } from "react";
|
|
import PropTypes from "prop-types";
|
|
|
|
import { CSSTransition } from "react-transition-group";
|
|
|
|
const DropdownSlide: FC<{
|
|
children: ReactNode;
|
|
duration: number;
|
|
}> = ({ children, duration, ...props }) => (
|
|
<CSSTransition
|
|
classNames="components-animation-slide"
|
|
timeout={150}
|
|
appear={true}
|
|
exit={true}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</CSSTransition>
|
|
);
|
|
DropdownSlide.propTypes = {
|
|
children: PropTypes.node.isRequired,
|
|
};
|
|
|
|
export { DropdownSlide };
|