@ntragas/pouncejstest
Version:
A collection of UI components from Panther labs
25 lines (23 loc) • 812 B
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import React from 'react';
import Box from '../Box';
import useHeadingStyles from './useHeadingStyles';
/**
* Responsive typographic component. Anywhere you want to add a title to something
* then you can use this
* */
export var Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
var _ref$size = _ref.size,
size = _ref$size === void 0 ? 'medium' : _ref$size,
rest = _objectWithoutPropertiesLoose(_ref, ["size"]);
var styles = useHeadingStyles({
size
});
return /*#__PURE__*/React.createElement(Box, _extends({
as: "h1",
ref: ref,
fontWeight: "normal"
}, styles, rest));
});
export default Heading;