UNPKG

koval-ui

Version:

React components collection with minimalistic design. Supports theming, layout, and input validation.

40 lines (39 loc) 868 B
"use client"; import { jsxs as f, jsx as t } from "react/jsx-runtime"; import { forwardRef as N } from "react"; import d from "classnames"; import s from "./Button.module.css.js"; const b = N( ({ children: r, onClick: a, type: e = "button", disabled: n, variant: c = "primary", className: i, prefix: o, suffix: m, size: l = "medium", ...p }, u) => /* @__PURE__ */ f( "button", { ...p, ref: u, onClick: a, type: e, className: d(s.button, s[c], s[l], i), disabled: n, children: [ o && /* @__PURE__ */ t(o, { className: s.icon }), /* @__PURE__ */ t("div", { className: s.content, children: r }), m && /* @__PURE__ */ t(m, { className: s.icon }) ] } ) ); b.displayName = "Button"; export { b as Button }; //# sourceMappingURL=Button.js.map