UNPKG

@drivy/cobalt

Version:

Opinionated design system for Drivy's projects.

32 lines (31 loc) 1.37 kB
import { jsx, jsxs } from "react/jsx-runtime"; import classnames from "classnames"; import { camelize } from "../../utils/index.js"; const iconSource = "file"; const FileIcon = ({ 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: "M19.5 21H4.5V1.5L4.347 1.508C3.59 1.585 3 2.223 3 3V21C3 21.828 3.672 22.5 4.5 22.5H19.5C20.328 22.5 21 21.828 21 21V8.25L14.25 1.5H4.5V3H13.5V6.75C13.5 7.993 14.507 9 15.75 9H19.5zM15 4.371 18.129 7.5H15.75C15.336 7.5 15 7.164 15 6.75z" }) ] }) }); }; const _generated_FileIcon = FileIcon; export default _generated_FileIcon; //# sourceMappingURL=FileIcon.js.map