UNPKG

@drivy/cobalt

Version:

Opinionated design system for Drivy's projects.

32 lines (31 loc) 1.59 kB
import { jsx, jsxs } from "react/jsx-runtime"; import classnames from "classnames"; import { camelize } from "../../utils/index.js"; const iconSource = "diamond"; const DiamondIcon = ({ color, size = 24, contained = false, className })=>{ const computedClassName = classnames(className, `cobalt-Icon cobalt-Icon--${iconSource}`, { [`c-fill-${camelize(color || "")}`]: color, "cobalt-Icon--size16": 16 === size, "cobalt-Icon--size20": 20 === size, "cobalt-Icon--size32": 32 === size, "cobalt-Icon--contained": contained }); return /*#__PURE__*/ jsx("span", { className: computedClassName, children: /*#__PURE__*/ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [ /*#__PURE__*/ jsx("title", { children: iconSource }), /*#__PURE__*/ jsx("path", { d: "M18.375 2.625C18.645 2.625 18.895 2.771 19.028 3.007L22.654 9.452 12.582 21.848C12.44 22.023 12.226 22.125 12 22.125S11.56 22.023 11.418 21.848L1.346 9.452 4.972 3.007 5.027 2.923C5.167 2.737 5.387 2.625 5.625 2.625zM11.25 19.262V10.125H3.826zM12.75 19.262 20.174 10.125H12.75zM9.907 8.625H14.093L12 4.904zM16.589 8.625H20.469L18.413 4.973zM3.532 8.625H7.412L5.584 4.973zM8.664 7.776 10.718 4.125H6.838zM15.335 7.776 17.161 4.125H13.281z" }) ] }) }); }; const _generated_DiamondIcon = DiamondIcon; export default _generated_DiamondIcon; //# sourceMappingURL=DiamondIcon.js.map