1
0
Fork 0
freesewing/packages/freesewing.shared/components/icon/index.js
2021-12-11 14:04:05 +01:00

29 lines
494 B
JavaScript

import icons from './icons'
const Icon = ({
size = 24,
icon = 'github',
color = false,
className = '',
embed = false
}) => {
const svgProps = {
xmlns: 'http://www.w3.org/2000/svg',
viewBox: '0 0 24 24',
className: className,
}
if (size && !embed) {
svgProps.width = size
svgProps.height = size
}
return (
<svg {...svgProps}>
<path stroke="none" fill={color ? color : 'currentColor'} d={icons[icon]} />
</svg>
)
}
export default Icon