--- import { cn } from '../lib/cn' import { ACCEPTED_IMAGE_TYPES } from '../lib/zodUtils' import Button from './Button.astro' import InputFile from './InputFile.astro' import Tooltip from './Tooltip.astro' import type { ComponentProps } from 'astro/types' type Props = Omit, 'accept'> & { square?: boolean value?: string | null downloadButton?: boolean } const { class: className, square, value, downloadButton, ...inputFileProps } = Astro.props function makeDownloadFilename(value: string) { const url = new URL(value, Astro.url.origin) return url.pathname.split('/').pop() ?? 'service-image' } ---
Preview { downloadButton && value && (