Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
feat(lsg): load external pattern icon as image source, adjust styling
Browse files Browse the repository at this point in the history
fix #91
  • Loading branch information
Alexpeschel authored and lkuechler committed Dec 20, 2017
1 parent 051990c commit 1642d7b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/lsg/patterns/pattern-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ const StyledPatternListItem = styled.div`
props.draggable ? 'cursor: move;' : props.onClick ? 'cursor: pointer;' : ''};
`;

const StyledSVG = styled.svg`
margin-right: ${getSpace(Size.L)}px;
fill: ${colors.grey50.toString()};
const StyledIcon = styled(Icon)`
display: block;
margin: 0 auto ${getSpace(Size.XS)}px;
`;

const StyledIcon = styled(Icon)`
const StyledImg = styled.img`
display: block;
width: 18px;
height: 18px;
margin: 0 auto ${getSpace(Size.XS)}px;
`;

Expand All @@ -73,7 +75,7 @@ export const PatternListItem: React.StatelessComponent<PatternListItemProps> = p
return (
<StyledPatternListItem onDragStart={handleDragStart} draggable={draggable} onClick={onClick}>
{icon ? (
<StyledSVG className="pattern__icon">{icon}</StyledSVG>
<StyledImg className="pattern__icon" src={icon} />
) : (
<StyledIcon
className="pattern__icon"
Expand Down

0 comments on commit 1642d7b

Please sign in to comment.