welcome-ui
Version:
Customizable design system with react, typescript, tailwindcss and ariakit.
26 lines (25 loc) • 644 B
JavaScript
"use client";
import { u as f } from "./PZ3OL7I2-Cfim3UGe.js";
import { f as c, c as m, L as i, M as a, q as B, a as l } from "./U6HHPQDW-CzxyP5H7.js";
import { useRef as v, useState as N, useEffect as g } from "react";
var n = "button", d = m(
function(t) {
const e = v(null), u = i(e, n), [o, s] = N(
() => !!u && a({ tagName: u, type: t.type })
);
return g(() => {
e.current && s(a(e.current));
}, []), t = {
role: !o && u !== "a" ? "button" : void 0,
...t,
ref: B(e, t.ref)
}, t = f(t), t;
}
), E = c(function(t) {
const e = d(t);
return l(n, e);
});
export {
E as B,
d as u
};