UNPKG

@heroui/listbox

Version:

A listbox displays a list of options and allows a user to select one or more of them.

38 lines (35 loc) 895 B
"use client"; // src/listbox-selected-icon.tsx import { jsx } from "react/jsx-runtime"; function ListboxSelectedIcon(props) { const { isSelected, disableAnimation, ...otherProps } = props; return /* @__PURE__ */ jsx( "svg", { "aria-hidden": "true", "data-selected": isSelected, role: "presentation", viewBox: "0 0 17 18", ...otherProps, children: /* @__PURE__ */ jsx( "polyline", { fill: "none", points: "1 9 7 14 15 4", stroke: "currentColor", strokeDasharray: 22, strokeDashoffset: isSelected ? 44 : 66, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, style: !disableAnimation ? { transition: "stroke-dashoffset 200ms ease" } : {} } ) } ); } export { ListboxSelectedIcon };