Skip to content
This repository has been archived by the owner on Jun 5, 2022. It is now read-only.

Importing UploadIcon.svg as Component #23

Merged
merged 1 commit into from
Apr 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/component/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@
.fileContainer .uploadIcon {
width: 50px;
height: 50px;
background: url(UploadIcon.svg);
-webkit-background-size: cover;
background-size: cover;
}

.fileContainer .uploadPicturesWrapper {
Expand Down
4 changes: 3 additions & 1 deletion src/component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import './index.css';
import FlipMove from 'react-flip-move';
import UploadIcon from './UploadIcon.svg';

const styles = {
display: "flex",
Expand Down Expand Up @@ -82,7 +83,8 @@ class ReactImageUploadComponent extends React.PureComponent {
*/
renderIcon() {
if (this.props.withIcon) {
return <div className="uploadIcon"/>;
return <img src={UploadIcon} className="uploadIcon"
alt="Upload Icon" />;
}
}

Expand Down