@antv/t8
Version:
T8 is a text visualization solution for unstructured data within the AntV technology stack, and it is a declarative T8 markdown syntax that can be used to describe the content of data interpretation reports.
21 lines (18 loc) • 799 B
JavaScript
import { jsx } from 'preact/jsx-runtime';
import { createContext } from 'preact';
import { useContext } from 'preact/compat';
import { ParagraphType } from '../../../schema/paragraph.js';
import '../../../schema/phrase.js';
function CurrentParagraphInfoProvider(_a) {
var paragraphType = _a.paragraphType, children = _a.children;
return (jsx(CurrentParagraphInfoContext.Provider, { value: { paragraphType: paragraphType }, children: children }));
}
var CurrentParagraphInfoContext = createContext({
paragraphType: ParagraphType.NORMAL,
});
function useCurrentParagraphInfo() {
var paragraphInfo = useContext(CurrentParagraphInfoContext);
return paragraphInfo;
}
export { CurrentParagraphInfoProvider, useCurrentParagraphInfo };
//# sourceMappingURL=currentParagraphInfo.js.map