UNPKG

@zohodesk/components

Version:

In this Package, we Provide Some Basic Components to Build Web App

35 lines 961 B
import React from 'react'; import { defaultProps } from "./props/defaultProps"; import { propTypes } from "./props/propTypes"; import { whiteSpaceClassMapping } from "../../utils/cssUtils"; import style from "../../Heading/Heading.module.css"; export default function Heading(props) { let { tagName, className, onClick, onDoubleClick, title, dataTitle, dataId, a11y, whiteSpace } = props; return /*#__PURE__*/React.createElement(tagName, { className: `${style.reset} ${whiteSpace ? whiteSpaceClassMapping[whiteSpace] : ''} ${className}`, onClick, onDoubleClick, 'data-title': dataTitle || title, 'data-id': dataId, 'data-test-id': dataId, 'data-title-wrap': whiteSpace, ...a11y }, title); } Heading.propTypes = propTypes; Heading.defaultProps = defaultProps; // if (__DOCS__) { // Heading.docs = { // folderName: 'Style Guide', // componentGroup: 'Accessibility' // }; // }