@drivy/cobalt
Version:
Opinionated design system for Drivy's projects.
34 lines (33 loc) • 1.39 kB
JavaScript
import { jsx, jsxs } from "react/jsx-runtime";
import classnames from "classnames";
import { camelize } from "../../utils/index.js";
const iconSource = "twitter";
const TwitterIcon = ({ 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: "M8.765 4 12.895 9.883 18.068 4H19.48L13.522 10.774 20 20H15.235L10.873 13.787 5.411 20H4L10.246 12.896 4 4zM5.92 5.04 15.9 19.008H18.066L8.087 5.04z",
clipRule: "evenodd"
})
]
})
});
};
const _generated_TwitterIcon = TwitterIcon;
export default _generated_TwitterIcon;
//# sourceMappingURL=TwitterIcon.js.map