UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

38 lines 1.69 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { PureComponent } from 'react'; import { akTypographyMixins } from '@atlaskit/util-shared-styles'; import styled from 'styled-components'; var H1 = (_a = ["", ""], _a.raw = ["", ""], styled.h1(_a, akTypographyMixins.h800)); var H2 = (_b = ["", ""], _b.raw = ["", ""], styled.h2(_b, akTypographyMixins.h700)); var H3 = (_c = ["", ""], _c.raw = ["", ""], styled.h3(_c, akTypographyMixins.h600)); var H4 = (_d = ["", ""], _d.raw = ["", ""], styled.h4(_d, akTypographyMixins.h500)); var H5 = (_e = ["", ""], _e.raw = ["", ""], styled.h5(_e, akTypographyMixins.h400)); var H6 = (_f = ["", ""], _f.raw = ["", ""], styled.h6(_f, akTypographyMixins.h300)); var Heading = (function (_super) { tslib_1.__extends(Heading, _super); function Heading() { return _super !== null && _super.apply(this, arguments) || this; } Heading.prototype.render = function () { var _a = this.props, level = _a.level, children = _a.children; switch (level) { case 1: return React.createElement(H1, null, children); case 2: return React.createElement(H2, null, children); case 3: return React.createElement(H3, null, children); case 4: return React.createElement(H4, null, children); case 5: return React.createElement(H5, null, children); case 6: return React.createElement(H6, null, children); } }; return Heading; }(PureComponent)); export default Heading; var _a, _b, _c, _d, _e, _f; //# sourceMappingURL=heading.js.map