@workday/canvas-kit-docs
Version:
Documentation components of Canvas Kit components
8 lines (7 loc) • 491 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import { registerWidget, Value } from '../Value';
import { RenderContext } from '../widgetUtils';
registerWidget('intersection', ({ value }) => {
return (_jsx(RenderContext.Provider, { value: "inline", children: value.value.map((v, i) => (_jsxs(React.Fragment, { children: [i !== 0 && _jsx("span", { className: "token punctuation", children: " & " }), _jsx(Value, { value: v })] }, i))) }));
});