Skip to content

Commit 34c7b93

Browse files
committed
update Pill to download image on icon click
1 parent 5a60b83 commit 34c7b93

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/components/Pill/Pill.react.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import styles from 'components/Pill/Pill.scss';
1010
import Icon from "components/Icon/Icon.react";
1111

1212
//TODO: refactor, may want to move onClick outside or need to make onClick able to handle link/button a11y
13-
let Pill = ({ value, onClick, followClick = false }) => (
13+
let Pill = ({ value, onClick, fileDownloadLink, followClick = false }) => (
1414
<span
1515
className={[
1616
styles.pill,
@@ -22,7 +22,14 @@ let Pill = ({ value, onClick, followClick = false }) => (
2222
{followClick && (
2323
<a
2424
onClick={onClick}
25-
className={!onClick ? styles.disableIconAction : styles.iconAction}
25+
>
26+
<Icon name="right-outline" width={20} height={20} fill="#1669a1" />
27+
</a>
28+
)}
29+
{!followClick && fileDownloadLink && (
30+
<a
31+
href={fileDownloadLink}
32+
target="_blank"
2633
>
2734
<Icon name="right-outline" width={20} height={20} fill="#1669a1" />
2835
</a>

0 commit comments

Comments
 (0)