UNPKG

@nextcloud/vue

Version:
53 lines (52 loc) 1.38 kB
"use strict"; const Vue = require("vue"); const constants = require("./constants-C_lA-vcp.cjs"); const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs"); const _sfc_main = { __name: "NcThemeProvider", props: { /** * Enforce the dark theme for the content. */ dark: { type: Boolean, default: false }, /** * Enforce the light theme for the content */ light: { type: Boolean, default: false } }, setup(__props) { const props = __props; const theme = Vue.computed(() => { if (props.dark) { return "dark"; } else if (props.light) { return "light"; } return ""; }); Vue.provide(constants.INJECTION_KEY_THEME, theme); return { __sfc: true, props, theme }; } }; var _sfc_render = function render() { var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy; return _c("div", _vm._b({}, "div", _vm._d({}, [`data-theme-${_setup.theme}`, _setup.theme])), [_vm._t("default")], 2); }; var _sfc_staticRenderFns = []; var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent( _sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, null ); const NcThemeProvider = __component__.exports; exports.NcThemeProvider = NcThemeProvider; //# sourceMappingURL=NcThemeProvider-BqGPTeWg.cjs.map