UNPKG

@drivy/cobalt

Version:

Opinionated design system for Drivy's projects.

20 lines (17 loc) 1.21 kB
import { jsx, jsxs } from 'react/jsx-runtime'; import cx from 'classnames'; import 'lodash.throttle'; import camelize from '../../utils/camelize.js'; 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, }); return (jsx("span", { className: computedClassName, children: jsxs("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [jsx("title", { children: iconSource }), jsx("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