@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.
31 lines (27 loc) • 1.18 kB
JavaScript
;
var jsxRuntime = require('preact/jsx-runtime');
require('../../schema/paragraph.js');
require('../../schema/phrase.js');
var isSpecType = require('../../schema/utils/isSpecType.js');
var index = require('../styled/index.js');
var index$1 = require('../phrases/index.js');
var getPrefixCls = require('../../utils/getPrefixCls.js');
var classnames = require('../../utils/classnames.js');
require('clarinet');
var theme = require('../context/hooks/theme.js');
require('../context/hooks/plugin.js');
require('../context/hooks/event.js');
require('../../plugin/index.js');
require('tslib');
require('../../theme/seed/index.js');
function Heading(_a) {
var spec = _a.spec;
var weight = isSpecType.getHeadingWeight(spec.type);
if (isNaN(weight))
return null;
var Tag = index["H".concat(weight)];
var themeSeedToken = theme.useTheme();
return (jsxRuntime.jsx(Tag, { className: classnames.classnames(getPrefixCls.getPrefixCls("h".concat(weight)), spec.className), style: spec.styles, theme: themeSeedToken, children: jsxRuntime.jsx(index$1.Phrases, { spec: spec.phrases }) }));
}
exports.Heading = Heading;
//# sourceMappingURL=Heading.js.map