@kloudlite/design-system
Version:
A design system for building ambitious products.
71 lines (69 loc) • 2.49 kB
JavaScript
;
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// components/atoms/thumbnail.tsx
var thumbnail_exports = {};
__export(thumbnail_exports, {
Thumbnail: () => Thumbnail
});
module.exports = __toCommonJS(thumbnail_exports);
var import_classnames = __toESM(require("classnames"), 1);
var import_jsx_runtime = require("react/jsx-runtime");
var Thumbnail = ({
src,
size = "md",
rounded = false
}) => {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"div",
{
className: (0, import_classnames.default)(
"kl-rounded kl-border kl-border-border-default kl-overflow-clip",
{
"kl-w-5xl kl-h-5xl": size === "xs",
"kl-w-6xl kl-h-6xl": size === "sm",
"kl-w-8xl kl-h-8xl": size === "md",
"kl-w-9xl kl-h-w-9xl": size === "lg"
},
{
"kl-rounded-full": rounded,
"kl-rounded-md": !rounded
}
),
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"img",
{
src,
alt: "thumbnail",
className: "kl-w-full kl-h-full kl-object-cover"
}
)
}
);
};