UNPKG

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

29 lines (26 loc) 1.08 kB
import { jsx } from 'preact/jsx-runtime'; import '../../schema/paragraph.js'; import '../../schema/phrase.js'; import { getHeadingWeight } from '../../schema/utils/isSpecType.js'; import * as index from '../styled/index.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 '../context/hooks/event.js'; import '../../plugin/index.js'; import 'tslib'; import '../../theme/seed/index.js'; function Heading(_a) { var spec = _a.spec; var weight = getHeadingWeight(spec.type); if (isNaN(weight)) return null; var Tag = index["H".concat(weight)]; var themeSeedToken = useTheme(); return (jsx(Tag, { className: classnames(getPrefixCls("h".concat(weight)), spec.className), style: spec.styles, theme: themeSeedToken, children: jsx(Phrases, { spec: spec.phrases }) })); } export { Heading }; //# sourceMappingURL=Heading.js.map