dify/web/app/components/app-sidebar/app-info/app-info-detail-drawer.tsx
Coding On Star 8581a68174
refactor(web): drop headless-ui, migrate overlay to dify-ui (#35963)
Co-authored-by: CodingOnStar <hanxujiang@dify.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2026-05-09 10:33:25 +00:00

35 lines
805 B
TypeScript

import type { ReactNode } from 'react'
type AppInfoDetailDrawerProps = {
open: boolean
onClose: () => void
children: ReactNode
}
export function AppInfoDetailDrawer({
open,
onClose,
children,
}: AppInfoDetailDrawerProps) {
if (!open)
return null
return (
<div className="absolute inset-0 z-50">
<button
type="button"
aria-label="Close app info"
className="absolute inset-0 cursor-default bg-app-detail-overlay-bg"
onClick={onClose}
/>
<section
role="dialog"
aria-modal="false"
className="absolute top-2 bottom-2 left-2 flex w-[452px] max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-2xl border-r border-divider-burn bg-app-detail-bg"
>
{children}
</section>
</div>
)
}