@drivy/cobalt
Version:
Opinionated design system for Drivy's projects.
22 lines (19 loc) • 1.23 kB
JavaScript
import React from 'react';
import camelize from '../../utils/camelize.js';
import 'lodash.throttle';
import cx from 'classnames';
const iconSource = "card";
const CardIcon = ({ 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: "M4 4.992C4 3.892 4.893 3 5.995 3h12.01C19.107 3 20 3.893 20 4.992v10.016c0 1.1-.893 1.992-1.995 1.992H5.995A1.995 1.995 0 0 1 4 15.008V4.992Zm16 13.476v.54c0 1.1-.893 1.992-1.995 1.992H5.995A1.995 1.995 0 0 1 4 19.008v-.541A3.978 3.978 0 0 0 5.995 19h12.01A3.98 3.98 0 0 0 20 18.468ZM6 13V5h12v8H6Z" })));
};
export { CardIcon as default };
//# sourceMappingURL=CardIcon.js.map