@workday/canvas-kit-docs
Version:
Documentation components of Canvas Kit components
9 lines (8 loc) • 528 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { PropertiesInline, PropertiesTable, registerWidget } from '../Value';
import { RenderContext } from '../widgetUtils';
registerWidget('object', ({ value }) => {
const renderContext = React.useContext(RenderContext);
return renderContext === 'inline' ? (_jsx(PropertiesInline, { properties: value.properties })) : (_jsx(RenderContext.Provider, { value: "inline", children: _jsx(PropertiesTable, { properties: value.properties }) }));
});