@drivy/cobalt
Version:
Opinionated design system for Drivy's projects.
20 lines (17 loc) • 1.19 kB
JavaScript
import { jsx, jsxs } from 'react/jsx-runtime';
import cx from 'classnames';
import 'lodash.throttle';
import camelize from '../../utils/camelize.js';
const iconSource = "star";
const StarIcon = ({ color, size = 24, contained = false, className, }) => {
const computedClassName = cx(className, `cobalt-Icon cobalt-Icon--${iconSource}`, {
[`c-fill-${camelize(color || "")}`]: color,
"cobalt-Icon--size16": size === 16,
"cobalt-Icon--size20": size === 20,
"cobalt-Icon--size32": size === 32,
"cobalt-Icon--contained": contained,
});
return (jsx("span", { className: computedClassName, children: jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [jsx("title", { children: iconSource }), jsx("path", { d: "M12.181 1.886a.2.2 0 0 0-.362 0l-3.018 6.43a.2.2 0 0 1-.151.113L1.885 9.463a.2.2 0 0 0-.113.337l4.908 5.03a.2.2 0 0 1 .054.172l-1.157 7.091a.2.2 0 0 0 .294.208l6.032-3.335a.2.2 0 0 1 .194 0l6.032 3.335a.2.2 0 0 0 .294-.207l-1.157-7.092a.2.2 0 0 1 .055-.172l4.907-5.03a.2.2 0 0 0-.113-.338L15.35 8.43a.2.2 0 0 1-.15-.113z" })] }) }));
};
export { StarIcon as default };
//# sourceMappingURL=StarIcon.js.map