Skip to content

Commit

Permalink
Changing template default icon png -> svg.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nes-si committed Nov 2, 2021
1 parent f2e29b1 commit 8cb63e0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
7 changes: 7 additions & 0 deletions src/assets/images/template-empty.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 9 additions & 4 deletions src/components/modals/SiteCreationModal/SiteCreationModal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, {Component} from 'react';
import CSSModules from 'react-css-modules';
import InlineSVG from 'svg-inline-react';

import ButtonControl from 'components/elements/ButtonControl/ButtonControl';
import InputControl from 'components/elements/InputControl/InputControl';
Expand All @@ -9,7 +10,7 @@ import {removeOddSpaces} from "utils/strings";

import styles from './SiteCreationModal.sss';

import ImageTemplateEmpty from "assets/images/template-empty.png";
import ImageTemplateEmpty from "assets/images/template-empty.svg";


@CSSModules(styles, {allowMultiple: true})
Expand Down Expand Up @@ -43,9 +44,13 @@ export class TemplateControl extends Component {
<div styleName="TemplateControl"
onClick={this.onClick}>
<div styleName={style}>
<img styleName="icon-img"
src={this.template.icon ? this.template.icon.url() : ImageTemplateEmpty}>
</img>
{this.template.icon ?
<img styleName="icon-img"
src={this.template.icon.url()} />
:
<InlineSVG styleName="icon-img"
src={ImageTemplateEmpty} />
}
<div styleName="text">
<div styleName="title">{this.template.name}</div>
<div styleName="description">{this.template.description}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
.icon,
.icon-img
width: 80px
height: 80px
margin-right: 25px

.text
Expand Down

0 comments on commit 8cb63e0

Please sign in to comment.