UNPKG

@sandlada/vue-mdc

Version:

![Vue MDC Logo](https://raw.githubusercontent.com/sandlada/vue-mdc/refs/heads/main/docs/vue-mdc-cover.png)

42 lines (41 loc) 1.5 kB
/** * @license * Copyright 2025 Sandlada & Kai Orion * SPDX-License-Identifier: MIT */ import { createVNode, createTextVNode, Fragment, render } from "vue"; import { isServer } from "../../utils/is-server.js"; const defaultIcon = createVNode("svg", { "xmlns": "http://www.w3.org/2000/svg", "height": "24px", "viewBox": "0 -960 960 960", "width": "24px", "fill": "var(var(--md-navigation-destination-icon-color, --md-sys-color-on-surface, #000))" }, [createTextVNode(" "), createVNode("path", { "d": "M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z" }, null), createTextVNode(" ")]); function renderNavigationDestination(options) { const { container, props, tabs, component } = options; if (isServer() || !container.value) { return; } const components = tabs.map((tabConfig) => { const iconSlot = typeof tabConfig.icon === "undefined" || tabConfig.icon === null ? defaultIcon : createVNode(tabConfig.icon); return createVNode(component, { ...props(tabConfig) }, { default: () => iconSlot }); }); const parent = createVNode(Fragment, null, components); render(parent, container.value); } export { renderNavigationDestination }; //# sourceMappingURL=render-navigation-destination.js.map