@antv/t8
Version:
T8 is a text visualization solution for unstructured data within the AntV technology stack, and it is a declarative JSON Schema syntax that can be used to describe the content of data interpretation reports.
37 lines (34 loc) • 1.53 kB
JavaScript
import { jsx } from 'preact/jsx-runtime';
import '../styled/bullet.js';
import '../styled/container.js';
import '../styled/entity.js';
import { Headline as Headline$1 } from '../styled/heading.js';
import '../styled/marks.js';
import '../styled/paragraph.js';
import { Phrases } from '../phrases/index.js';
import { getPrefixCls } from '../../utils/getPrefixCls.js';
import { classnames } from '../../utils/classnames.js';
import 'clarinet';
import { useTheme } from '../context/hooks/theme.js';
import '../context/hooks/plugin.js';
import { useEvent } from '../context/hooks/event.js';
import '../../plugin/index.js';
import 'tslib';
import '../../theme/seed/index.js';
function Headline(_a) {
var spec = _a.spec;
var onEvent = useEvent().onEvent;
var themeSeedToken = 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 (jsx(Headline$1, { onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, className: classnames(getPrefixCls('headline'), spec.className), style: spec.styles, theme: themeSeedToken, children: jsx(Phrases, { spec: spec.phrases }) }));
}
export { Headline };
//# sourceMappingURL=Headline.js.map