@drivy/cobalt
Version:
Opinionated design system for Drivy's projects.
34 lines (33 loc) • 1.43 kB
JavaScript
import { jsx, jsxs } from "react/jsx-runtime";
import classnames from "classnames";
import { camelize } from "../../utils/index.js";
const iconSource = "mail";
const MailIcon = ({ 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: "M21 3.75C21.828 3.75 22.5 4.422 22.5 5.25V18.75C22.5 19.578 21.828 20.25 21 20.25H3C2.172 20.25 1.5 19.578 1.5 18.75V5.25C1.5 4.422 2.172 3.75 3 3.75zM12 13.749 3 5.829V18.75H21V5.829zM12 11.751 19.387 5.25H4.613z",
clipRule: "evenodd"
})
]
})
});
};
const _generated_MailIcon = MailIcon;
export default _generated_MailIcon;
//# sourceMappingURL=MailIcon.js.map