@vela-ui/react
Version:
Vela UI React components
59 lines (57 loc) • 2.52 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/components/alert.tsx
var alert_exports = {};
__export(alert_exports, {
Alert: () => Alert,
AlertContent: () => AlertContent,
AlertDescription: () => AlertDescription,
AlertTitle: () => AlertTitle
});
module.exports = __toCommonJS(alert_exports);
var import_tailwind_variants = require("tailwind-variants");
var import_jsx_runtime = require("react/jsx-runtime");
var alertVariants = (0, import_tailwind_variants.tv)({
slots: {
root: "bg-card text-card-foreground relative flex w-full items-start gap-3 rounded-lg border p-4 text-sm [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5 [&>svg]:text-current",
content: "flex flex-1 flex-col gap-1",
title: "font-medium",
description: "text-muted-foreground"
}
});
var { root, content, title, description } = alertVariants();
function Alert({ className, ...props }) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-slot": "alert", role: "alert", className: root({ className }), ...props });
}
function AlertContent({ className, ...props }) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-slot": "alert-content", className: content({ className }), ...props });
}
function AlertTitle({ className, ...props }) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-slot": "alert-title", className: title({ className }), ...props });
}
function AlertDescription({ className, ...props }) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-slot": "alert-description", className: description({ className }), ...props });
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Alert,
AlertContent,
AlertDescription,
AlertTitle
});