@trimble-oss/moduswebcomponents
Version:
Modus Web Components is a modern, accessible UI library built with Stencil JS that provides reusable web components following Trimble's Modus design system. This updated version focuses on improved flexibility, enhanced theming options, comprehensive cust
13 lines (12 loc) • 959 B
JavaScript
import { h } from "@stencil/core";
import { KEY } from "../components/utils";
export const CloseSolidIcon = ({ ariaLabel, className, decorative = true, onClear, }) => {
const handleKeydown = (event) => {
if (event.key === KEY.Enter || event.key === KEY.Space) {
event.preventDefault();
if (onClear)
onClear(event);
}
};
return (h("svg", { "aria-hidden": decorative ? 'true' : undefined, "aria-label": ariaLabel || undefined, class: className || '', fill: "currentColor", onClick: onClear || undefined, onKeyDown: handleKeydown, role: decorative ? undefined : 'button', tabindex: decorative ? -1 : 0, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7A.996.996 0 1 0 5.7 7.11L10.59 12 5.7 16.89a.996.996 0 1 0 1.41 1.41L12 13.41l4.89 4.89a.996.996 0 1 0 1.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4" })));
};