AttachmentItem
apps/www/src/components/AttachmentItem.astro · 30 lines · group Models (product catalog)
Used by
- skattedosan.se /en/models/model-a/ × 6
- skattedosan.se /en/models/model-c/ × 6
- skattedosan.se /models/model-a/ × 6history: commit 1396f74 (2026-08-18)
- skattedosan.se /models/model-c/ × 6history: commit 1396f74 (2026-08-18)
Live sites: skattedosan.se.
Samples 4
<AttachmentsSection>MDX of this sample
<AttachmentsSection title="Attachments">
<AttachmentItem
fileName="Certificate"
file="/C2Y-CU-001-01-44 ÄB16 Certifikat_typeA.pdf"
downloadText="Download"
/>
<AttachmentItem
fileName="Technical specification"
file="/TekniskspecifikationSkattedosan.pdf"
downloadText="Download"
/>
</AttachmentsSection><AttachmentsSection>MDX of this sample
<AttachmentsSection title="Attachments">
<AttachmentItem
fileName="Certificate"
file="/C2Y-CU-001-01-45 ÄB16 Certifikat_typeC.pdf"
downloadText="Download"
/>
<AttachmentItem
fileName="Technical specification"
file="/TekniskspecifikationSkattedosan.pdf"
downloadText="Download"
/>
</AttachmentsSection><AttachmentsSection>MDX of this sample
<AttachmentsSection title="Attachments">
<AttachmentItem
fileName="Certificate"
file="/C2Y-CU-001-01-44 ÄB16 Certifikat_typeA.pdf"
downloadText="Download"
/>
<AttachmentItem
fileName="Technical specification"
file="/TekniskspecifikationSkattedosan.pdf"
downloadText="Download"
/>
</AttachmentsSection><AttachmentsSection>MDX of this sample
<AttachmentsSection title="Attachments">
<AttachmentItem
fileName="Certificate"
file="/C2Y-CU-001-01-45 ÄB16 Certifikat_typeC.pdf"
downloadText="Download"
/>
<AttachmentItem
fileName="Technical specification"
file="/TekniskspecifikationSkattedosan.pdf"
downloadText="Download"
/>
</AttachmentsSection>Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| fileName | string | yes | ||
| file | string | yes | ||
| downloadText | string | yes |
Source apps/www/src/components/AttachmentItem.astro @ gitt.one
---
import PaperClip from 'astro-heroicons/solid/PaperClip.astro';
interface Props {
fileName: string;
file: string;
downloadText: string;
}
const { fileName, file, downloadText } = Astro.props;
---
<li
class="border border-gray-200 rounded-md pl-3 pr-4 py-3 mb-1 flex items-center justify-between text-sm"
>
<div class="w-0 flex-1 flex items-center">
<PaperClip class="flex-shrink-0 h-5 w-5 text-gray-400" aria-hidden="true" />
<span class="ml-2 flex-1 w-0 truncate">{fileName}</span>
</div>
<div class="ml-4 flex-shrink-0">
<a
href={file}
download
class="font-medium text-primary-600 hover:text-primary-500"
>
{downloadText}
</a>
</div>
</li>Source links point to engine-astro@e857a859. Samples are cut from the sites' own content by scripts/gallery-extract.mjs; nothing is merged or removed yet.