@drivy/cobalt
Version:
Opinionated design system for Drivy's projects.
22 lines (19 loc) • 1.29 kB
JavaScript
import React from 'react';
import camelize from '../../utils/camelize.js';
import 'lodash.throttle';
import cx from 'classnames';
const iconSource = "key";
const KeyIcon = ({ 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: "M3.037 18.068c.053-.158.185-.29.51-.614L9.5 11.5c-1-2-.006-4.506 2.996-7.5C14 2.5 16 2 19 5c3 3 2.5 5 1 6.5-3 3-5.5 4-7.504 3L12 15h-2v1.955H8V19H6v2H4c-.5 0-.75 0-.875-.124C3 20.75 3 20.5 3 20V18.5c0-.203 0-.324.037-.432Zm15.252-8.781c-.494.493-1.695.092-2.682-.895-.988-.988-1.389-2.189-.896-2.682.494-.494 1.695-.093 2.682.895.988.988 1.389 2.188.895 2.682Z" })));
};
export { KeyIcon as default };
//# sourceMappingURL=KeyIcon.js.map