@blueprintjs/icons
Version:
Components, fonts, icons, and css files for creating and displaying icons.
30 lines • 2.21 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
/*
* Copyright 2024 Palantir Technologies, Inc. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from "react";
import { IconSize } from "../../iconTypes";
import { SVGIconContainer } from "../../svgIconContainer";
/** Path data for the 16px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_16 = ["m3.63 14.496-3.496-6a.98.98 0 0 1 0-.992l3.495-6c.182-.312.52-.504.885-.504h6.972c.366 0 .703.192.885.504l3.495 6a.98.98 0 0 1 0 .992l-3.495 6c-.182.312-.52.504-.885.504H4.514c-.366 0-.703-.192-.885-.504m6.377-2.996H5.993L3.954 8l2.04-3.5h4.013L12.046 8zm-4.9 1.5h5.788l2.913-5-2.913-5H5.106L2.193 8zM8 9c.563 0 1.02-.448 1.02-1S8.562 7 8 7s-1.02.448-1.02 1S7.438 9 8 9"];
/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M7.35 5h5.3l2.77 5-2.77 5h-5.3l-2.77-5zm1.15 5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5-1.5.67-1.5 1.5M4.63 1.51c.18-.31.52-.51.89-.51h8.95c.37 0 .71.19.89.51l4.52 8c.17.3.17.67 0 .97l-4.51 8c-.18.31-.52.51-.89.51H5.53c-.37 0-.71-.19-.89-.51l-4.51-8a.99.99 0 0 1 0-.97zM6.13 17h7.76l3.95-7-3.95-7H6.13l-3.95 7z"];
export const Hexagon = React.forwardRef((props, ref) => {
const isLarge = (props.size ?? IconSize.STANDARD) >= IconSize.LARGE;
const paths = isLarge ? PATHS_20 : PATHS_16;
return (_jsx(SVGIconContainer, { iconName: "hexagon", ref: ref, ...props, children: paths.map((d, i) => (_jsx("path", { d: d, fillRule: "evenodd" }, i))) }));
});
Hexagon.displayName = `Blueprint6.Icon.Hexagon`;
export default Hexagon;
//# sourceMappingURL=hexagon.js.map