UNPKG

@drivy/cobalt

Version:

Opinionated design system for Drivy's projects.

40 lines (39 loc) 1.8 kB
import { jsx, jsxs } from "react/jsx-runtime"; import classnames from "classnames"; import { camelize } from "../../utils/index.js"; const iconSource = "battery"; const BatteryIcon = ({ 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: "M16.5 12.75H18V14.25H16.5V15.75H15V14.25H13.5V12.75H15V11.25H16.5zM10.5 14.25H6V12.75H10.5z" }), /*#__PURE__*/ jsx("path", { fillRule: "evenodd", d: "M22.125 6.75H21V19.5C21 20.328 20.328 21 19.5 21H4.5C3.672 21 3 20.328 3 19.5V6.75H1.875V5.25H22.125zM4.5 19.5H19.5V6.75H4.5z", clipRule: "evenodd" }), /*#__PURE__*/ jsx("path", { d: "M6.75 2.25C7.164 2.25 7.5 2.586 7.5 3V3.75H4.5V3C4.5 2.586 4.836 2.25 5.25 2.25zM18.75 2.25C19.164 2.25 19.5 2.586 19.5 3V3.75H16.5V3C16.5 2.586 16.836 2.25 17.25 2.25z" }) ] }) }); }; const _generated_BatteryIcon = BatteryIcon; export default _generated_BatteryIcon; //# sourceMappingURL=BatteryIcon.js.map