UNPKG

reka-ui

Version:

Vue port for Radix UI Primitives.

14 lines (11 loc) 322 B
import type { VNode } from 'vue' import { Fragment } from 'vue' export function renderSlotFragments(children?: VNode[]): VNode[] { if (!children) return [] return children.flatMap((child) => { if (child.type === Fragment) return renderSlotFragments(child.children as VNode[]) return [child] }) }