UNPKG

@indielayer/ui

Version:

Indielayer UI Components with Tailwind CSS build for Vue 3

19 lines (18 loc) 631 B
import { defineComponent as a, inject as c, ref as i, unref as r, provide as f, watchEffect as l, renderSlot as p } from "vue"; import { injectThemeKey as n } from "../../composables/keys.js"; import { injectThemeStyles as u } from "../../theme.js"; const h = { name: "XThemeProvider" }, y = /* @__PURE__ */ a({ ...h, props: { theme: Object }, setup(m) { const t = m, o = c(n, {}), e = i(t.theme || r(o) || {}); return f(n, e), l(() => { e.value = t.theme || r(o) || {}, e.value.styles && u(e.value.name || "", e.value.styles); }), (s, d) => p(s.$slots, "default"); } }); export { y as default };