Skip to content

Commit

Permalink
feat: Add Download icon
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinszuchet committed Oct 18, 2024
1 parent 9d7e381 commit e6243e8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
24 changes: 24 additions & 0 deletions src/components/Icons/DownloadIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react'

import './styles.css'

const DownloadIcon = () => (
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clip-path="url(#clip0_6_9647)">
<path d="M19 9H15V3H9V9H5L12 16L19 9ZM5 18V20H19V18H5Z" fill="#323232" />
</g>
<defs>
<clipPath id="clip0_6_9647">
<rect width="24" height="24" fill="white" />
</clipPath>
</defs>
</svg>
)

export default DownloadIcon
12 changes: 10 additions & 2 deletions src/components/UserMenu/UserMenu.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@
height: 100%;
}

.dcl .user-menu__jump-in {
.dcl .user-menu__download {
padding: 14px 32px;
margin-left: 24px;
display: flex;
align-items: center;
justify-content: center;
column-gap: 2px;
}

.dcl .user-menu__download svg g path {
fill: var(--text-on-primary);
}

@media (max-width: 991px) {
.dcl .user-menu__jump-in {
.dcl .user-menu__download {
display: none;
}
}
4 changes: 3 additions & 1 deletion src/components/UserMenu/UserMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Row } from '../Row/Row'

import './UserMenu.css'
import { useTabletAndBelowMediaQuery } from '../Media'
import DownloadIcon from '../Icons/DownloadIcon'

export const UserMenu = React.memo((props: UserMenuProps) => {
const {
Expand Down Expand Up @@ -164,12 +165,13 @@ export const UserMenu = React.memo((props: UserMenuProps) => {
</Button>
) : null}
<Button
className="user-menu__jump-in"
className="user-menu__download"
primary
onClick={handleDownload}
as={'a'}
href={config.get('DOWNLOAD_URL')}
>
<DownloadIcon />
{i18n.download}
</Button>
</>
Expand Down

0 comments on commit e6243e8

Please sign in to comment.