-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(attachment): adding button download (#499)
Co-authored-by: Jeroen Claassens <support@favware.tech>
- Loading branch information
1 parent
c7f3584
commit 056368b
Showing
5 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/core/src/components/svgs/AttachmentDownloadButton.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { html, svg } from 'lit'; | ||
import { spread } from '../../spread.js'; | ||
|
||
const svgContent = svg` | ||
<path | ||
fill="currentColor" | ||
d="M12 2a1 1 0 0 1 1 1v10.59l3.3-3.3a1 1 0 1 1 1.4 1.42l-5 5a1 1 0 0 1-1.4 0l-5-5a1 1 0 1 1 1.4-1.42l3.3 3.3V3a1 1 0 0 1 1-1ZM3 20a1 1 0 1 0 0 2h18a1 1 0 1 0 0-2H3Z" | ||
/> | ||
`; | ||
|
||
export default function AttachmentDownloadButton(props: Record<string, unknown> = {}) { | ||
return html`<svg | ||
${spread(props)} | ||
class="discord-icon-download" | ||
aria-hidden="true" | ||
role="img" | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="20" | ||
height="20" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
> | ||
${svgContent} | ||
</svg>`; | ||
} |