Skip to content
Snippets Groups Projects
Commit 3dde0f0c authored by Allen Gilliland's avatar Allen Gilliland
Browse files

Merge pull request #1168 from metabase/illustration_icon_consistency

consistent illustration icon usage
parents bb346049 7d2b4fd4
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,6 @@ export const fetchCards = createThunkAction(FETCH_CARDS, function(filterMode, fi
for (var c of cards) {
c.created_at = moment(c.created_at);
c.updated_at = moment(c.updated_at);
c.icon = c.display ? 'illustration_visualization_' + c.display : null;
}
return cards;
};
......
......@@ -42,7 +42,7 @@ export default class Cards extends Component {
{items.map(item =>
<li key={item.id} className="flex pt2">
<div className="pb2 mr2">
<img style={{height: "36px"}} src={"/app/components/icons/assets/" + item.icon + ".png"} />
<Icon name={'illustration-'+item.display} width={36} height={36} />
</div>
<div className="flex align-center flex-full border-bottom pb2">
<div className="text-brand-hover">
......
import Icon from "metabase/components/Icon.react";
import RadioSelect from 'metabase/components/RadioSelect.react';
export default class SortableItemList extends React.Component {
constructor(props) {
super(props);
......@@ -39,7 +41,7 @@ export default class SortableItemList extends React.Component {
<a className="no-decoration flex p2" href="#" onClick={() => this.onClickItem(item)}>
<div className="flex align-center flex-full mr2">
{this.props.showIcons ?
<div><img className="mr2" style={{height: "48px"}} src={"/app/components/icons/assets/" + item.icon + ".png"} /></div>
<div className="mr2"><Icon name={'illustration-'+item.display} width={48} height={48} /></div>
: null}
<div className="text-brand-hover">
<h3 className="mb1">{item.name}</h3>
......
......@@ -88,7 +88,6 @@ export const fetchCards = createThunkAction(FETCH_CARDS, function(filterMode = "
let cards = await Card.list({ filterMode });
for (var c of cards) {
c.updated_at = moment(c.updated_at);
c.icon = c.display ? 'illustration_visualization_' + c.display : null;
}
return normalize(cards, arrayOf(card));
};
......
......@@ -24,9 +24,8 @@ export default class RecentViews extends Component {
renderIllustration(item) {
if (item.model === 'card' && 'display' in item.model_object) {
const icon = (item.model_object.display === 'line') ? 'illustration-area' : 'illustration-'+item.model_object.display;
return (
<Icon name={icon} width={22} height={22} />
<Icon name={'illustration-'+item.model_object.display} width={22} height={22} />
);
} else if(item.model === 'dashboard') {
......
This diff is collapsed.
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