import React from 'react';
import styled from 'styled-components';
import { isElement } from '../../common/utils';
import { Typography } from '../..';
var H2 = styled.h2.withConfig({
  displayName: "Title__H2",
  componentId: "sc-1ls1ckn-0"
})(["padding-right:", "px;"], function (p) {
  return p.theme.spacing.unit(4);
});
export var Title = function Title(_ref) {
  var title = _ref.title,
    uid = _ref.uid;
  return React.createElement("span", {
    id: uid
  }, isElement(title) ? title : React.createElement(Typography, {
    as: H2,
    type: "title2"
  }, title));
};