'use client' import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigger, } from '@/app/components/base/portal-to-follow-elem' import type { PortalToFollowElemOptions } from '@/app/components/base/portal-to-follow-elem' type IFloatRightContainerProps = { isMobile: boolean open: boolean toggle: () => void triggerElement?: React.ReactNode children?: React.ReactNode } & PortalToFollowElemOptions const FloatRightContainer = ({ open, toggle, triggerElement, isMobile, children, ...portalProps }: IFloatRightContainerProps) => { return ( <> {isMobile && ( {triggerElement} {children} )} {!isMobile && open && ( <>{children} )} ) } export default FloatRightContainer