UNPKG

@drivy/cobalt

Version:

Opinionated design system for Drivy's projects.

20 lines (17 loc) 1.08 kB
import { jsx, jsxs } from 'react/jsx-runtime'; import cx from 'classnames'; import 'lodash.throttle'; import camelize from '../../utils/camelize.js'; const iconSource = "incident"; const IncidentIcon = ({ 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", { d: "M2.2 16.06 3.88 12 2.2 7.94l4.06-1.68L7.94 2.2 12 3.88l4.06-1.68 1.68 4.06 4.06 1.68L20.12 12l1.68 4.06-4.06 1.68-1.68 4.06L12 20.12 7.94 21.8l-1.68-4.06-4.06-1.68ZM13 17v-2h-2v2h2Zm0-4V7h-2v6h2Z" })] }) })); }; export { IncidentIcon as default }; //# sourceMappingURL=IncidentIcon.js.map