Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
001elijah committed Apr 28, 2023
1 parent 1a2674d commit 2da100d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/assets/icons/sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/components/Icon/Icon.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import svg from '../../assets/icons/sprite.svg';

const svgStyle = {
verticalAlign: 'text-top'
};

const Icon = ({ name, height, width }) => (
<svg width={width} height={height} fill="red">
<svg width={width} height={height} fill="red" style={svgStyle}>
<use xlinkHref={`${svg}#${name}`} />
</svg>
);
Expand Down

0 comments on commit 2da100d

Please sign in to comment.