Files
medusa-store/packages/admin-ui/ui/src/components/atoms/toaster-container/index.tsx
2023-03-03 10:09:16 +01:00

34 lines
636 B
TypeScript

import clsx from "clsx"
import React from "react"
type ToasterContainerProps = {
visible: boolean
} & React.HTMLAttributes<HTMLDivElement>
const ToasterContainer: React.FC<ToasterContainerProps> = ({
children,
visible,
className,
...rest
}) => {
return (
<div
className={clsx(
"flex items-start bg-grey-90 p-base border rounded-rounded shadow-toaster mb-xsmall last:mb-0",
{
"animate-enter": visible,
},
{
"animate-leave": !visible,
},
className
)}
{...rest}
>
{children}
</div>
)
}
export default ToasterContainer