UNPKG

wix-style-react

Version:
28 lines (26 loc) 967 B
import React from 'react'; import Heading from '../../Heading'; import { classes } from '../MarketingLayout.st.css'; import { isString } from '../../utils/StringUtils'; import { MARKETING_LAYOUT_TITLE } from '../dataHooks'; import { SIZES } from '../constants'; import PropTypes from 'prop-types'; var Title = function Title(_ref) { var children = _ref.children, appearance = _ref.appearance; return /*#__PURE__*/React.createElement("div", { className: classes.title }, isString(children) ? appearance === SIZES.tiny ? /*#__PURE__*/React.createElement("div", { "data-hook": MARKETING_LAYOUT_TITLE }, children) : /*#__PURE__*/React.createElement(Heading, { dataHook: MARKETING_LAYOUT_TITLE, appearance: appearance }, children) : /*#__PURE__*/React.createElement("div", { "data-hook": MARKETING_LAYOUT_TITLE }, children)); }; Title.propTypes = { children: PropTypes.node, appearance: PropTypes.string }; export default Title;