koval-ui
Version:
React components collection with minimalistic design. Supports theming, layout, and input validation.
28 lines (27 loc) • 620 B
JavaScript
"use client";
import { jsxs as l, jsx as n } from "react/jsx-runtime";
import { useCallback as i } from "react";
import m from "classnames";
import o from "./Tabs.module.css.js";
const d = ({ tabName: s, onClick: t, icon: c, activeName: r }) => {
const e = i(() => {
t(s);
}, [t, s]);
return /* @__PURE__ */ l(
"button",
{
type: "button",
onClick: e,
className: m(o.button, { [o.selected]: r === s }),
children: [
c && /* @__PURE__ */ n(c, { className: o.icon }),
s
]
},
s
);
};
export {
d as TabButton
};
//# sourceMappingURL=TabButton.js.map