use green icon for download/open file icon

This commit is contained in:
Sean Yesmunt 2018-06-25 02:28:03 -04:00
parent 218a328cac
commit 95cf3dd9d8
2 changed files with 8 additions and 6 deletions

View file

@ -4,8 +4,10 @@ import * as FeatherIcons from 'react-feather';
import * as icons from 'constants/icons'; import * as icons from 'constants/icons';
import Tooltip from 'component/common/tooltip'; import Tooltip from 'component/common/tooltip';
// It would be nice to standardize this somehow
// These are copied from `scss/vars`, can they both come from the same source?
const RED_COLOR = '#e2495e'; const RED_COLOR = '#e2495e';
const PURPLE_COLOR = '#8165b0'; const GREEN_COLOR = '#44b098';
type Props = { type Props = {
icon: string, icon: string,
@ -29,10 +31,10 @@ class IconComponent extends React.PureComponent<Props> {
switch (color) { switch (color) {
case 'red': case 'red':
return RED_COLOR; return RED_COLOR;
case 'purple': case 'green':
return PURPLE_COLOR; return GREEN_COLOR;
default: default:
return null; return undefined;
} }
}; };

View file

@ -77,7 +77,7 @@ class FileDownloadLink extends React.PureComponent<Props> {
<Button <Button
button="alt" button="alt"
icon={icons.DOWNLOAD} icon={icons.DOWNLOAD}
iconColor="purple" iconColor="green"
onClick={() => { onClick={() => {
purchaseUri(uri); purchaseUri(uri);
}} }}
@ -87,7 +87,7 @@ class FileDownloadLink extends React.PureComponent<Props> {
} else if (fileInfo && fileInfo.download_path) { } else if (fileInfo && fileInfo.download_path) {
return ( return (
<ToolTip onComponent body={__('Open file')}> <ToolTip onComponent body={__('Open file')}>
<Button button="alt" iconColor="purple" icon={icons.LOCAL} onClick={() => openFile()} /> <Button button="alt" iconColor="green" icon={icons.LOCAL} onClick={() => openFile()} />
</ToolTip> </ToolTip>
); );
} }