mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2025-12-08 17:32:27 +08:00
- Replace .eslintrc.json with eslint.config.mjs - Simplify configuration using @antfu/eslint-config - Add necessary ESLint plugin dependencies - Disable overly strict style rules - Set package.json type to module for ESM support - Fix ESLint disable comment format 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
33 lines
701 B
TypeScript
33 lines
701 B
TypeScript
import cn from '@/utils/classnames'
|
|
|
|
interface FileImageRenderProps {
|
|
imageUrl: string
|
|
className?: string
|
|
alt?: string
|
|
onLoad?: () => void
|
|
onError?: () => void
|
|
showDownloadAction?: boolean
|
|
}
|
|
const FileImageRender = ({
|
|
imageUrl,
|
|
className,
|
|
alt,
|
|
onLoad,
|
|
onError,
|
|
showDownloadAction,
|
|
}: FileImageRenderProps) => {
|
|
return (
|
|
<div className={cn('border-[2px] border-effects-image-frame shadow-xs', className)}>
|
|
<img
|
|
className={cn('h-full w-full object-cover', showDownloadAction && 'cursor-pointer')}
|
|
alt={alt || 'Preview'}
|
|
onLoad={onLoad}
|
|
onError={onError}
|
|
src={imageUrl}
|
|
/>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default FileImageRender
|