UNPKG

ivt

Version:

Ivt Components Library

28 lines (25 loc) 1.63 kB
import React__default from 'react'; import { T as TooltipIndicator } from './TooltipIndicator-DgBUQgOI.mjs'; import { c as cn } from './utils-05LlW3Cl.mjs'; import { B as Badge } from './badge-rV4HbE_R.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" }, value || "-") : /*#__PURE__*/ React__default.createElement("span", { className: "text-foreground text-sm font-semibold sm:text-base" }, value || "-")); }; export { ListItem as L }; //# sourceMappingURL=ListItem-D8UYYQVp.mjs.map