analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
64 lines (57 loc) • 2.79 kB
JavaScript
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunk34ST3MKOjs = require('./chunk-34ST3MKO.js');
var _chunkANT66KVKjs = require('./chunk-ANT66KVK.js');
// src/components/EmptyState/EmptyState.tsx
var _jsxruntime = require('react/jsx-runtime');
var EmptyState = ({
image,
title,
description,
buttonText,
buttonIcon,
onButtonClick,
buttonVariant = "solid",
buttonAction = "primary",
size = "large"
}) => {
const displayTitle = title || "Nenhum dado dispon\xEDvel";
const displayDescription = description || "N\xE3o h\xE1 dados para exibir no momento.";
const titleClassName = size === "compact" ? "text-text-600 text-sm font-semibold text-center" : "text-text-950 text-3xl font-semibold text-center";
const descriptionClassName = size === "compact" ? "text-text-600 text-sm font-normal text-center" : "text-text-600 text-[18px] font-normal text-center";
const containerMinHeight = size === "compact" ? "min-h-0" : "min-h-[705px]";
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
"div",
{
className: `flex flex-col justify-center items-center gap-6 w-full ${containerMinHeight} bg-background rounded-xl p-6`,
children: [
image && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-w-[170px] max-h-[150px] flex items-center justify-center", children: typeof image === "string" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
"img",
{
src: image,
alt: displayTitle,
className: "w-full h-full max-w-[170px] max-h-[150px]"
}
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-[170px] h-[150px] flex items-center justify-center", children: image }) }),
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center gap-4 w-full max-w-[600px] px-6", children: [
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkANT66KVKjs.Text_default, { as: "h2", className: titleClassName, children: displayTitle }),
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkANT66KVKjs.Text_default, { className: descriptionClassName, children: displayDescription })
] }),
buttonText && onButtonClick && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
_chunk34ST3MKOjs.Button_default,
{
variant: buttonVariant,
action: buttonAction,
size: "large",
onClick: onButtonClick,
iconLeft: buttonIcon,
className: "rounded-full px-5 py-2.5",
children: buttonText
}
)
]
}
);
};
var EmptyState_default = EmptyState;
exports.EmptyState_default = EmptyState_default;
//# sourceMappingURL=chunk-JL5R5KTY.js.map