<template lang="pug">
a(
    :href="downloadSrc"
    donwload
).w-full.border.border-gray-02.p-4.flex.flex-row.flex-start
    .w-auto.mr-4
        //@slot Slot for download icon
        slot
            Icon(name="download24", path="/spritemap.svg")
    .w-auto
        span.text-base.text-grey-03 {{ title }}
</template>

<script>
import Icon from './Icon'

export default {
	components: {
		Icon,
	},
	props: {
		/** The title of the file.
		 */
		title: {
			type: String,
			default: '',
		},
		/** The path to the downloadable file.
		 */
		downloadSrc: {
			type: String,
			default: '',
		},
	},
}
</script>

<style lang="scss">
</style>
<docs>
```jsx
<DownloadLink 
    downloadSrc="documents/file.pdf" 
    title="Document name"
/>
```
</docs>
