UNPKG

@drivy/cobalt

Version:

Opinionated design system for Drivy's projects.

20 lines (17 loc) 1.14 kB
import { jsx, jsxs } from 'react/jsx-runtime'; import cx from 'classnames'; import 'lodash.throttle'; import camelize from '../../utils/camelize.js'; const iconSource = "warning"; const WarningIcon = ({ 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", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [jsx("title", { children: iconSource }), jsx("path", { fillRule: "evenodd", d: "M12.252 4.45c-.904 0-1.57.727-1.496 1.622l.67 8.044c.04.474.455.861.928.861h.042a.956.956 0 0 0 .928-.861l.67-8.044c.075-.898-.595-1.621-1.496-1.621zm1.747 13.538a1.624 1.624 0 1 1-3.249 0 1.624 1.624 0 0 1 3.249 0", clipRule: "evenodd" })] }) })); }; export { WarningIcon as default }; //# sourceMappingURL=WarningIcon.js.map