@trail-ui/react
Version:
20 lines (18 loc) • 547 B
JavaScript
// src/multiselect/tw-icon.tsx
import React from "react";
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
function Icon({ children, "aria-label": ariaLabel, ...props }) {
const child = React.Children.only(children);
return /* @__PURE__ */ jsxs(Fragment, { children: [
React.cloneElement(child, {
"aria-hidden": "true",
"aria-label": void 0,
focusable: "false",
...props
}),
ariaLabel ? /* @__PURE__ */ jsx("span", { className: "sr-only", children: ariaLabel }) : null
] });
}
export {
Icon
};