UNPKG

ivt

Version:

Ivt Components Library

28 lines (25 loc) 1.74 kB
import React__default from 'react'; import { T as TooltipIndicator } from './TooltipIndicator-o_ekzuQD.mjs'; import { c as cn } from './utils-BDcRwQMd.mjs'; import { B as Badge } from './badge-ZU62MOiS.mjs'; const ListItem = ({ title, value, linkHref, isBoolean, className, hasTooltip = false, tooltipContent })=>{ return /*#__PURE__*/ React__default.createElement("div", { className: cn("border-b-border flex flex-wrap justify-between gap-x-1 gap-y-2 border-b p-2.5", className) }, hasTooltip && tooltipContent ? /*#__PURE__*/ React__default.createElement("div", { className: "flex items-center gap-1.5 text-muted-foreground text-sm font-medium sm:text-base" }, /*#__PURE__*/ React__default.createElement("p", null, title), /*#__PURE__*/ React__default.createElement(TooltipIndicator, { className: "max-w-60" }, tooltipContent)) : /*#__PURE__*/ React__default.createElement("p", { className: "text-muted-foreground text-sm font-medium sm:text-base" }, title), isBoolean ? /*#__PURE__*/ React__default.createElement(Badge, { variant: "outline", className: "rounded-md font-semibold" }, value ? "Sim" : "Não") : linkHref ? /*#__PURE__*/ React__default.createElement("a", { href: linkHref, className: "text-primary hover:text-primary/90 text-sm font-semibold hover:underline sm:text-base" }, typeof value === "string" && value.trim() === "" ? "-" : value ?? "-") : /*#__PURE__*/ React__default.createElement("span", { className: "text-foreground text-sm font-semibold sm:text-base" }, typeof value === "string" && value.trim() === "" ? "-" : value ?? "-")); }; export { ListItem as L }; //# sourceMappingURL=ListItem-CtUZSq2i.mjs.map