@drivy/cobalt
Version:
Opinionated design system for Drivy's projects.
23 lines (20 loc) • 1.82 kB
JavaScript
import React from 'react';
import camelize from '../../utils/camelize.js';
import 'lodash.throttle';
import cx from 'classnames';
const iconSource = "gift";
const GiftIcon = ({ 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,
});
const wrap = (content) => (React.createElement("span", { className: computedClassName }, content));
return wrap(React.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.238 7.394h4.368c.206 0 .394.166.394.386v2.207c0 .22-.188.386-.394.386h-7.969V7.449h-1.274v2.924h-7.97A.392.392 0 0 1 3 9.987V7.78c0-.22.188-.386.394-.386h4.369c-.638-.092-1.05-.386-1.294-.643-.394-.386-.6-.938-.6-1.508C5.869 4.158 6.675 3 8.156 3c1.069 0 2.213.588 3.413 1.765.072.08.145.156.216.23.075.078.147.154.215.23.131-.147.281-.313.431-.46C13.631 3.588 14.775 3 15.844 3c.675 0 1.275.257 1.706.717.375.405.581.956.581 1.526 0 .57-.206 1.103-.6 1.508-.243.257-.656.551-1.293.643Zm-9.094-2.17c0 .46.281.938 1.087.938h2.888c-.806-.9-1.969-1.912-2.982-1.912-.787 0-.993.607-.993.975Zm5.719.938c.806-.882 1.968-1.912 2.98-1.912.788 0 .994.607.994.975a.945.945 0 0 1-.243.643c-.188.202-.469.294-.844.294h-2.887Z" }),
React.createElement("path", { d: "M4.088 20.485c0 .276.243.515.524.515h6.77v-9.395H4.087v8.88ZM12.656 21h6.75a.531.531 0 0 0 .525-.515v-8.88h-7.275V21Z" })));
};
export { GiftIcon as default };
//# sourceMappingURL=GiftIcon.js.map