dify/web/app/components/plugins/readme-panel/dialog.tsx
Stephen Zhou a84c2d36a3
style: format with vp fmt (#38803)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-12 15:57:46 +00:00

39 lines
1.2 KiB
TypeScript

'use client'
import type { PluginDetail } from '../types'
import { Dialog, DialogCloseButton, DialogContent, DialogTitle } from '@langgenius/dify-ui/dialog'
import { useTranslation } from 'react-i18next'
import { ReadmePanelContent } from './content'
type ReadmeDialogProps = {
detail: PluginDetail
open: boolean
onOpenChange: (open: boolean) => void
triggerId?: string
}
export function ReadmeDialog({ detail, open, onOpenChange, triggerId }: ReadmeDialogProps) {
const { t } = useTranslation()
return (
<Dialog open={open} onOpenChange={onOpenChange} triggerId={triggerId}>
<DialogContent className="h-[calc(100dvh-16px)] w-full max-w-200 overflow-hidden p-0">
<ReadmePanelContent
detail={detail}
title={
<DialogTitle className="truncate text-xs font-medium text-text-tertiary uppercase">
{t(($) => $['readmeInfo.title'], { ns: 'plugin' })}
</DialogTitle>
}
closeButton={
<DialogCloseButton
aria-label={t(($) => $['operation.close'], { ns: 'common' })}
className="static size-8 rounded-lg"
/>
}
/>
</DialogContent>
</Dialog>
)
}