UNPKG

@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.

41 lines (37 loc) 1.9 kB
'use strict'; var jsxRuntime = require('preact/jsx-runtime'); var paragraph = require('../../schema/paragraph.js'); require('../../schema/phrase.js'); var getPrefixCls = require('../../utils/getPrefixCls.js'); var classnames = require('../../utils/classnames.js'); require('../styled/bullet.js'); require('../styled/container.js'); require('../styled/entity.js'); var heading = require('../styled/heading.js'); require('../styled/marks.js'); require('../styled/paragraph.js'); var index = require('../phrases/index.js'); var theme = require('../context/hooks/theme.js'); require('../context/hooks/plugin.js'); var event = require('../context/hooks/event.js'); var currentParagraphInfo = require('../context/hooks/currentParagraphInfo.js'); require('../../plugin/index.js'); require('tslib'); require('../../theme/seed/index.js'); function Headline(_a) { var spec = _a.spec; var onEvent = event.useEvent().onEvent; var themeSeedToken = theme.useTheme(); var onClick = function () { onEvent === null || onEvent === void 0 ? void 0 : onEvent('paragraph:click', spec); }; var onMouseEnter = function () { onEvent === null || onEvent === void 0 ? void 0 : onEvent('paragraph:mouseenter', spec); }; var onMouseLeave = function () { onEvent === null || onEvent === void 0 ? void 0 : onEvent('paragraph:mouseleave', spec); }; return (jsxRuntime.jsx(currentParagraphInfo.CurrentParagraphInfoProvider, { paragraphType: paragraph.ParagraphType.HEADLINE, children: jsxRuntime.jsx(heading.Headline, { onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, className: classnames.classnames(getPrefixCls.getPrefixCls('headline'), spec.className), style: spec.styles, theme: themeSeedToken, children: jsxRuntime.jsx(index.Phrases, { spec: spec.phrases }) }) })); } exports.Headline = Headline; //# sourceMappingURL=Headline.js.map