1 | "use strict";
|
2 |
|
3 | var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4 |
|
5 | exports.__esModule = true;
|
6 | exports["default"] = void 0;
|
7 |
|
8 | var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9 |
|
10 | var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
11 |
|
12 | var _core = require("@emotion/core");
|
13 |
|
14 | var _Box = _interopRequireDefault(require("../Box"));
|
15 |
|
16 | var _react = require("react");
|
17 |
|
18 |
|
19 | var sizes = {
|
20 | "2xl": ["4xl", null, "5xl"],
|
21 | xl: ["3xl", null, "4xl"],
|
22 | lg: ["xl", null, "2xl"],
|
23 | md: "xl",
|
24 | sm: "md",
|
25 | xs: "sm"
|
26 | };
|
27 | var Heading = (0, _react.forwardRef)(function (_ref, ref) {
|
28 | var _ref$size = _ref.size,
|
29 | size = _ref$size === void 0 ? "xl" : _ref$size,
|
30 | props = (0, _objectWithoutPropertiesLoose2["default"])(_ref, ["size"]);
|
31 | return (0, _core.jsx)(_Box["default"], (0, _extends2["default"])({
|
32 | ref: ref,
|
33 | as: "h2",
|
34 | fontSize: sizes[size],
|
35 | lineHeight: "shorter",
|
36 | fontWeight: "bold",
|
37 | fontFamily: "heading"
|
38 | }, props));
|
39 | });
|
40 | Heading.displayName = "Heading";
|
41 | var _default = Heading;
|
42 | exports["default"] = _default; |
\ | No newline at end of file |