Skip to content
Snippets Groups Projects
Commit 8168483d authored by Ray Schamp's avatar Ray Schamp
Browse files

Use native SVG rendering for library thumbnails

Now possible because we send down the correct content type for SVG assets.
parent f9172d3a
No related branches found
No related tags found
No related merge requests found
.library-item {
cursor: pointer;
text-align: center;
width: 140px;
}
.library-item.is-selected {
background: #aaa;
border-radius: 6px;
}
.library-item-image-container {
height: 140px;
}
.library-item-image {
align-self: center;
max-width: 100%;
max-height: 100%;
}
......@@ -3,7 +3,6 @@ const bindAll = require('lodash.bindall');
const React = require('react');
const Box = require('../box/box.jsx');
const CostumeCanvas = require('../costume-canvas/costume-canvas.jsx');
const styles = require('./library-item.css');
class LibraryItem extends React.Component {
......@@ -25,10 +24,14 @@ class LibraryItem extends React.Component {
[styles.isSelected]: this.props.selected
})}
direction="column"
width={140}
onClick={this.handleClick}
>
<CostumeCanvas url={this.props.iconURL} />
<Box className={styles.libraryItemImageContainer}>
<img
className={styles.libraryItemImage}
src={this.props.iconURL}
/>
</Box>
<p>{this.props.name}</p>
</Box>
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment