UNPKG

welcome-ui

Version:

Customizable design system with react • styled-components • styled-system and ariakit.

26 lines (25 loc) 667 B
"use client"; import { u as f } from "./KUU7WJ55-ClLMNDee.mjs"; import { f as c, c as m, h as i, j as B, k as u, d as l, e as d, g as v } from "./LVA2YJMS-B8X1PCyC.mjs"; import { useRef as g, useState as N, useEffect as _ } from "react"; var s = "button", R = m( function(t) { const e = g(null), a = B(e, s), [n, o] = N( () => !!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; } ), y = c(function(t) { const e = R(t); return i(s, e); }); export { y as B, R as u };