@esri/calcite-components
Version:
Web Components for Esri's Calcite Design System.
20 lines (16 loc) • 585 B
JavaScript
/*!
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
*/
;
const index = require('./index-1af0efd3.js');
function constrainHeadingLevel(level) {
return Math.min(Math.max(Math.ceil(level), 1), 6);
}
const Heading = (props, children) => {
const HeadingTag = `h${props.level}`;
delete props.level;
return index.h(HeadingTag, Object.assign({}, props), children);
};
exports.Heading = Heading;
exports.constrainHeadingLevel = constrainHeadingLevel;