@formant/ava-react
Version:
React components of AVA.
17 lines • 577 B
JavaScript
import React from 'react';
import { createCustomBlockFactory } from "../../../NarrativeTextVis";
import { DISPLAY_CHARTS_PLUGIN_KEY } from "../../constants";
import { ChartCarousel } from "../components/ChartCarousel";
/** plugins to display charts in ntv */
export var chartsDisplayPlugin = createCustomBlockFactory({
key: DISPLAY_CHARTS_PLUGIN_KEY,
render: function render(item) {
var chartSpecs = item.chartSpecs;
if (chartSpecs) {
return /*#__PURE__*/React.createElement(ChartCarousel, {
charts: chartSpecs
});
}
return null;
}
});