react-feather
Version:
React component for Feather icons
35 lines (30 loc) • 753 B
JavaScript
import React from 'react';
import PropTypes from 'prop-types';
const Star = props => {
const { color, size, ...otherProps } = props;
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
viewBox="0 0 24 24"
fill="none"
stroke={color}
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
{...otherProps}
>
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />
</svg>
);
};
Star.propTypes = {
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};
Star.defaultProps = {
color: 'currentColor',
size: '24',
};
export default Star;