@drivy/cobalt
Version:
Opinionated design system for Drivy's projects.
22 lines (19 loc) • 1.11 kB
JavaScript
import React from 'react';
import camelize from '../../utils/camelize.js';
import 'lodash.throttle';
import cx from 'classnames';
const iconSource = "flag";
const FlagIcon = ({ 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,
});
const wrap = (content) => (React.createElement("span", { className: computedClassName }, content));
return wrap(React.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5 3a1 1 0 0 1 2 0v19H5V3Zm9.3 1.047c-2.007-.635-4.083-1.292-6.3.52v7.865c2.186-1.72 4.235-1.071 6.216-.445 1.973.623 3.879 1.226 5.784-.555V3.568c-1.878 1.688-3.757 1.094-5.7.479Z" })));
};
export { FlagIcon as default };
//# sourceMappingURL=FlagIcon.js.map