'use client' import * as React from 'react' import * as DialogPrimitive from '@radix-ui/react-dialog' import { X } from 'lucide-react' import { cn } from '@/lib/utils' /** * Right slide-over for reviewing an object (UI-migration convention 13): * a 480px panel inset 18px from the frame edge, rounded, with veil, Esc * and click-outside. Create/confirm flows use the centered dialog instead; * this is the review surface (e.g. the Granskning detail). */ const SlideOver = DialogPrimitive.Root const SlideOverTrigger = DialogPrimitive.Trigger const SlideOverClose = DialogPrimitive.Close const SlideOverContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, children, ...props }, ref) => ( {children} )) SlideOverContent.displayName = 'SlideOverContent' /** * Header block: kicker line (actor · risk · time), serif title, close * button. Body scrolls; header and footer stay put. */ function SlideOverHeader({ kicker, title, className, }: { kicker?: React.ReactNode title: React.ReactNode className?: string }) { return (
{kicker && (
{kicker}
)} {title}
) } function SlideOverBody({ children, className, }: { children: React.ReactNode className?: string }) { return (
{children}
) } function SlideOverFooter({ children, className, }: { children: React.ReactNode className?: string }) { return (
{children}
) } export { SlideOver, SlideOverTrigger, SlideOverClose, SlideOverContent, SlideOverHeader, SlideOverBody, SlideOverFooter, }