analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
75 lines (72 loc) • 2.39 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/IconRoundedButton/IconRoundedButton.tsx
var IconRoundedButton_exports = {};
__export(IconRoundedButton_exports, {
default: () => IconRoundedButton_default
});
module.exports = __toCommonJS(IconRoundedButton_exports);
// src/utils/utils.ts
var import_clsx = require("clsx");
var import_tailwind_merge = require("tailwind-merge");
function cn(...inputs) {
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
}
// src/components/IconRoundedButton/IconRoundedButton.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var IconRoundedButton = ({
icon,
className = "",
disabled,
...props
}) => {
const baseClasses = [
"inline-flex",
"items-center",
"justify-center",
"w-8",
"h-8",
"rounded-full",
"cursor-pointer",
"border",
"border-background-200",
"bg-background",
"text-text-950",
"hover:shadow-hard-shadow-1",
"focus-visible:outline-none",
"focus-visible:shadow-hard-shadow-1",
"focus-visible:ring-2",
"focus-visible:ring-indicator-info",
"focus-visible:ring-offset-0",
"disabled:opacity-50",
"disabled:cursor-not-allowed"
].join(" ");
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"button",
{
type: "button",
className: cn(baseClasses, className),
disabled,
...props,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "flex items-center justify-center w-5 h-5", children: icon })
}
);
};
var IconRoundedButton_default = IconRoundedButton;
//# sourceMappingURL=index.js.map