Appearance
Function: downloadLink()
ts
function downloadLink(props: DownloadLinkProps): Element;Defined in: src/UI/blocks/downloadLink.tsx:35
Parameters
| Parameter | Type | Description |
|---|---|---|
props | DownloadLinkProps | Configuration object |
Returns
Element
Deprecated
Use the equivalent block from @matterway/sdk/UI instead. This block targets the old showUI path and will be removed when src/UI/ is dropped.
Button link element for downloading a file.
Example
Basic usage:
downloadLink({
file: {
filename: 'example.pdf',
filetype: 'application/pdf',
base64: 'JVBERi0xLjQKJazc... (truncated base64 string)',
},
text: 'Download PDF',
icon: 'download',
});