@drivy/cobalt
Version:
Opinionated design system for Drivy's projects.
20 lines (17 loc) • 1.55 kB
JavaScript
import { jsx, jsxs } from 'react/jsx-runtime';
import cx from 'classnames';
import 'lodash.throttle';
import camelize from '../../utils/camelize.js';
const iconSource = "weight";
const WeightIcon = ({ 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", { d: "M12 2.25a3 3 0 0 1 2.596 4.5h2.77c.732 0 1.359.53 1.48 1.253l2 12a1.5 1.5 0 0 1-1.48 1.747H4.635a1.502 1.502 0 0 1-1.48-1.747l2-12a1.5 1.5 0 0 1 1.48-1.253h2.77A3 3 0 0 1 9 5.25a3 3 0 0 1 3-3m2.634 9.352c-1.673 0-2.707 1.06-2.707 2.86v.004c0 1.826 1.03 2.883 2.741 2.884 1.58 0 2.52-.927 2.52-2.446v-.696h-2.473v1h1.111l-.004.07c-.046.557-.484.903-1.123.903-.81 0-1.334-.63-1.334-1.73v-.004c0-1.076.473-1.676 1.273-1.676.542 0 .938.265 1.084.714l.011.04h1.396l-.007-.048c-.146-1.076-1.127-1.875-2.488-1.875m-7.683.1v5.548h1.411v-1.568l.477-.62 1.385 2.188h1.657l-2.01-3.096 1.899-2.453h-1.512L8.39 14.144h-.028V11.7zM12 3.75a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 12 3.75" })] }) }));
};
export { WeightIcon as default };
//# sourceMappingURL=WeightIcon.js.map