This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/frontend/components/Icon/StarIcon.js

44 lines
1.1 KiB
JavaScript

// @flow
import React from 'react';
import Icon from './Icon';
import type { Props } from './Icon';
export default function StarIcon(props: Props & { solid?: boolean }) {
let icon;
if (props.solid) {
icon = (
<svg
fill="#000000"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M0 0h24v24H0z" fill="none" />
<path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" />
<path d="M0 0h24v24H0z" fill="none" />
</svg>
);
} else {
icon = (
<svg
fill="#000000"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z" />
<path d="M0 0h24v24H0z" fill="none" />
</svg>
);
}
return (
<Icon {...props}>
{icon}
</Icon>
);
}