UNPKG

@drivy/cobalt

Version:

Opinionated design system for Drivy's projects.

34 lines (33 loc) 1.54 kB
import { jsx, jsxs } from "react/jsx-runtime"; import classnames from "classnames"; import { camelize } from "../../utils/index.js"; const iconSource = "search"; const SearchIcon = ({ 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", { fillRule: "evenodd", d: "M10.5 3C14.642 3 18 6.358 18 10.5 18 12.301 17.365 13.953 16.307 15.246L21.155 20.095C20.57 20.68 19.62 20.68 19.035 20.095L15.245 16.307C13.953 17.365 12.301 18 10.5 18 6.358 18 3 14.642 3 10.5S6.358 3 10.5 3M10.5 4.5C7.186 4.5 4.5 7.186 4.5 10.5S7.186 16.5 10.5 16.5 16.5 13.814 16.5 10.5 13.814 4.5 10.5 4.5", clipRule: "evenodd" }) ] }) }); }; const _generated_SearchIcon = SearchIcon; export default _generated_SearchIcon; //# sourceMappingURL=SearchIcon.js.map