UNPKG

welcome-ui

Version:

Customizable design system with react, typescript, tailwindcss and ariakit.

26 lines (25 loc) 665 B
"use client"; import { u as f } from "./2W3RN7C5-bkX-rIa3.js"; import { f as c, c as m, b as i, N as B, O as u, d as l, p as d, a as v } from "./OE2EFRVA-C3721cM3.js"; import { useRef as N, useState as g, useEffect as _ } from "react"; var s = "button", b = m( function(t) { const e = N(null), a = B(e, s), [n, o] = g( () => !!a && u({ tagName: a, type: t.type }) ); return _(() => { e.current && o(u(e.current)); }, []), t = l(v({ role: !n && a !== "a" ? "button" : void 0 }, t), { ref: d(e, t.ref) }), t = f(t), t; } ), P = c(function(t) { const e = b(t); return i(s, e); }); export { P as B, b as u };